Page History
Table of Contents |
---|
Scope
- By default JS7 components products are configured to use log level INFO to limit disk space consumption.
- Higher log levels such as DEBUG and TRACE can be used to troubleshoot unexplained behavior.
For the location of Log4j2 configuration files see the JS7 - Log Files and Locations article.
Log Levels
Log levels can be modified in Log4j2 configuration files, see see the JS7 - Log Files and Locations article for more information.
Changes to the Log4j2 configuration are applied within 60s and do not require the JS7 component product to be restarted.
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<?xml version="1.0" encoding="UTF-8"?> <configuration status="WARN" shutdownHook="disable"> <Properties> <Property name="TimeZone">${env:SCHEDULERJS7_CONTROLLER_TZ:-Etc/UTC}</Property> <Property name="LogDir">${env:SCHEDULERJS7_CONTROLLER_LOGS:-logs}</Property> <Property name="LogBasename">${env:SCHEDULERJS7_CONTROLLER_APPNAME:-controller}</Property> <Property name="RetainDays">30d</Property> <Property name="MaxSizeOfRolledOverFiles">5GB<>5 GB</Property> <Property name="MaxSizePerFile">100MB<>100 MB</Property> <!-- Log level of the Root Logger. --> <Property name="RootLogLevel">INFO</Property> <!-- Configuration for a 2nd debug log file (OFF|DEBUG|TRACE) If this value is set to DEBUG or TRACE then the above RootLogLevel has to have the same value. --> <Property name="LogLevelOfDebugLog">OFF</Property> </Properties> ... <Configuration> |
Explanations:
Explanation:
- The Controller and Agent Log4j2 configuration files are the same except for the fact that environment variables in lines 4-6 for Agents use:
<Property name="TimeZone">${env:JS7_AGENT_TZ:-Etc/UTC}</Property>
<Property name="LogDir">${env:JS7_AGENT_LOGS:-logs}</Property>
<Property name="LogBasename">${env:JS7_AGENT_APPNAME:-agent}</Property>
- To enable the debug mode, change the To enable debug mode modify
<property name="RootLogLevel">INFO</property>
and<property name="LogLevelOfDebugLog">OFF</property>
toDEBUG.
Anchor | ||||
---|---|---|---|---|
|
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<?xml version="1.0" encoding="UTF-8"?> <Configuration> <Properties> <Property name="TimeZone">Etc/UTC</Property> <Property name="RetainDays">30d</Property> <Property name="MaxSizeOfRolledOverFiles">5 GB</Property> <Property name="MaxSizePerFile">100 MB</Property> <!-- Log level of the Root Logger. --> <Property name="RootLogLevel">INFO</Property> <!-- Configurations for 2nd debug log files (OFF|DEBUG|TRACE) If one of these values is set to DEBUG or TRACE then the above RootLogLevel has to have the same value. --> <Property name="JocLogLevel">OFF</Property> <Property name="ClusterLogLevel"ServiceClusterLogLevel">OFF</Property> <Property name="ServiceHistoryLogLevel">OFF</Property> <Property name="HistoryLogLevelServiceDailyPlanLogLevel">OFF</Property> <Property name="DailyPlanLogLevelServiceCleanupLogLevel">OFF</Property> <Property name="CleanupLogLevelServiceMonitorLogLevel">OFF</Property> <Property name="ServiceReportsLogLevel">OFF</Property> <Property name="AuthLogLevel">OFF</Property> <Property name="ConnectionPoolLogLevel">OFF</Property> </Properties> ... <Configuration> |
ExplanationsExplanation:
- To enable the debug mode modify , change the
<property name="RootLogLevel">INFO</property>
toDEBUG
. In addition, modify the value of one or more of the following properties accordingly to enable debug output with the respective debug log file:
ClusterLogLevelDebug Log File Property joc-debug.log
<Property name="JocLogLevel">DEBUG</Property>
service-cluster-debug.log
<Property name="
HistoryLogLevelServiceClusterLogLevel">DEBUG</Property>
service-history-debug.log
<Property name="
DailyPlanLogLevelServiceHistoryLogLevel">DEBUG</Property>
service-dailyplan-debug.log
<Property name="
CleanupLogLevelServiceDailyPlanLogLevel">DEBUG</Property>
service-cleanup-debug.log
<Property name="ServiceCleanupLogLevel">DEBUG</Property>
service-monitor-debug.log
<Property name="ServiceMonitorLogLevel">DEBUG</Property>
service-reports-debug.log
<Property name="
ServiceReportsLogLevel">DEBUG</Property>
authentication-debug.log
<Property name="AuthLogLevel">DEBUG</Property>
connection-pool-debug.log
<Property name="ConnectionPoolLogLevel">DEBUG</Property>
Log Rotation Settings
When switching to higher log levels such as DEBUG, TRACE then consider the increased disc space storage consumption.
By default JS7 components products are configured to limit disk space storage consumption and to limit the retention period for log files. Consider Refer to the instructions from in the JS7 - Log Rotation article to adjust settings for the max. log file size and retention period.
...
Such options are applied for specific areas of interest and are forwarded by use of the JAVA_OPTIONS
environment variable.
Applying debug options requires the respective JS7 component product in question to be restarted.
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
The examples below examples make use of the -Djavax.net.debug=ssl
Java option that is used to receive detailed information e.g. about TLS/SSL certificate handling. However, any Java options can be forwarded like this.
...
in this manner.
Log File
Output created from Java debug options is written to the stdout channel and therefore is added to the watchdog.log
file in the Controller's or Agent's logs
directory, see the JS7 - Log Files and Locations article.
Unix Operating Systems
For Windows Unix, the JAVA_OPTIONS
environment variable can be set before running the Controller or Agent start script like this: scripts as follows:
From the Unix command line or from the Controller instance, start the
controller_<instance>.sh
script:Code Block language bash title Windows Unix example to run the Controller start script with debug options @rem# Set debug options before running the Controller start script setexport JAVA_OPTIONS="-Djavax.net.debug=ssl" .\/controller.cmdsh start @rem# Alternatively set debug options when running the Controller start script .\/controller.cmdsh start --java-options="-Djavax.net.debug=ssl" # For use with a Controller daemon add this line to the Controller instance start script controller_<instance>.sh export JAVA_OPTIONS="-Djavax.net.debug=ssl"
From the Unix command line or from the Agent instance
agent_4445.sh
start script (assuming that port4445
is used for the Agent):Code Block language bash title Windows Unix example to run the Agent start script with debug options @rem# Set debug options before running the Agent start script setexport JAVA_OPTIONS="-Djavax.net.debug=ssl" .\/agent.cmdsh start @rem# Alternatively set debug options when running the Agent start script .\/agent.cmdsh start --java-options="-Djavax.net.debug=ssl"
- When operating the Controller or Agent as a Windows Service then from the .
\service
directory of the installation run- for a Controller:
sos_jobscheduler_controller_<port>w.exe
- for an Agent:
sos_jobscheduler_agent_<port>w.exe
- where
<port>
corresponds to the port that the Controller or Agent has been installed for. - Example:
C:\Program Files\sos-berlin.com\js7\agent_4445\service\sos_jobscheduler_agent_4445w.exe
- where
- This brings up a utility that allows to specify Java options:
- Consider that the Controller or Agent Windows Service has to be restarted to apply changes to Java options.
- for a Controller:
Unix Operating Systems
# For use with an Agent daemon add this line to the Agent instance start script agent_<port>.sh export JAVA_OPTIONS="-Djavax.net.debug=ssl"
- Alternatively the
JAVA_OPTIONS
environment variable can be set with:- the profile (
~/.bashrc
,~/.bash_profile
etc.) of the run-time account used for Controller or Agent, - the JS7 - systemd Service Files for automated Startup and Shutdown with Unix Systems.
- the profile (
Windows Operating Systems
For Windows, For Unix the JAVA_OPTIONS
environment variable can be set before running the Controller or Agent start scripts as follows:
From the Windows command line or from the Controller instance start
...
the
controller_<instance>.cmd
script:Code Block language bash title Unix Windows example to run the Controller start script with debug options #@rem Set debug options before running the Controller start script exportset JAVA_OPTIONS="-Djavax.net.debug=ssl" ./\controller.shcmd start #@rem Alternatively set debug options when running the Controller start script ./\controller.shcmd start --java-options="-Djavax.net.debug=ssl" @rem For use with a Controller Windows Service add this line to the Controller instance start script controller_<instance>.cmd set JAVA_OPTIONS="-Djavax.net.debug=ssl"
From the Windows command line or from the Agent instance start the
agent_4445.cmd
script (assuming that port4445
is used for the Agent):Code Block language bash title Unix Windows example to run the Agent instance start script with debug options #@rem Set debug options before running the Agent start script export frm the command line set JAVA_OPTIONS="-Djavax.net.debug=ssl" ./\agent.shcmd start #@rem Alternatively set debug options when running the Agent start script ./\agent.shcmd start --java-options="-Djavax.net.debug=ssl"
Applying Debug Options to JOC Cockpit
Windows Operating Systems
For Windows the JAVA_OPTIONS environment variable can be set before running the JOC Cockpit start script like this:
Code Block language bash title Windows example to run the Controller start script with debug options @rem Set debug options before running the Controller start script @rem For use with an Agent Windows Service add this line to the Agent instance start script agent_<port>.cmd set JAVA_OPTIONS="-Djavax.net.debug=ssl" .\jetty.cmd start
- Alternatively, when operating the Controller or Agent When operating the JOC Cockpit as a Windows Service then, from the .
\service
directory of the installation, run- for a Controller:
js7_controller_<controller-id>w.exe
- where
<controller-id>
corresponds to the Controller ID the Controller has been installed with. - Example:
C:\Program Files\sos-berlin.com\js7\controller\my-controller\service\js7_controller_mycontrollerw.exe
- where
- for an Agent:
js7_agent
JOC Cockpit:sos_joc_<port>w.exe
- where
<port>
corresponds to the port that the JOC Cockpit has been installed forAgent is operated on. - Example:
C:\Program Files\sos-berlin.com\js7\jocagent_4445\service\sosjs7_jocagent_4446w4445w.exe
- where
- This brings up a utility that allows to specify Java options to be specified:
- for a Controller:
- Note: The Controller or Agent Consider that the JOC Cockpit Windows Service has to be restarted to apply changes to Java options.
Anchor | ||||
---|---|---|---|---|
|
Log File
Output created from Java debug options is written to the stdout channel and is therefore added to the jetty.log
file in the JOC Cockpit's logs
directory, see the JS7 - Log Files and Locations article.
Unix Operating Systems
For Unix the JAVA_OPTIONS
environment variable can be set before running the Jetty start script like thisas follows:
The Jetty start script is available from the installation directory
/opt/sos-berlin.com/js7/joc/jetty/bin/jetty.sh
or a location specified during installation:Code Block language bash title Unix example to run the Jetty start script with debug options # Set debug options before running the Jetty start script export JAVA_OPTIONS="-Djavax.net.debug=ssl" ./jetty.sh start
When running JOC Cockpit as a daemon then the following line can be added to the the
$HOME/.jocrc
file of the JOC Cockpit run-time account. This file is created by the installer and is used if it exists and is executable. The$HOME
directory is identified from the/etc/passwd
file during installation.Code Block language bash title Unix example to use $HOME/.jocrc with debug options export JAVA_OPTIONS="-Djavax.net.debug=ssl"
When running JOC Cockpit as a daemon then the
/etc/default/joc
file file can be created by the user (requires root permissions):permission). This file is not created by the installer and will be used if it exists and is executable. This file will not be used if the$HOME/.jocrc
file is present, see above.Code Block language bash title Unix example to use /etc/default/joc with debug options export JAVA_OPTIONS="-Djavax.net.debug=ssl"
- Alternatively the
JAVA_OPTIONS
environment variable can be set with:- the profile (
~/.bashrc
,~/.bash_profile
etc.) of the run-time account used for JOC Cockpit, - the JS7 - systemd Service Files for automated Startup and Shutdown with Unix Systems.
- the profile (
Windows Operating Systems
For Windows, the JAVA_OPTIONS
environment variable can be set before running the JOC Cockpit start script as follows:
The start script
C:\Program Files\sos-berlin.com\js7\joc\jetty\bin\jetty.cmd
is available only when JOC Cockpit is not installed as Windows Service.Code Block language bash title Windows example to run the JOC Cockpit start script with debug options @rem Set debug options before running the JOC Cockpit start script set JAVA_OPTIONS="-Djavax.net.debug=ssl" .\jetty.cmd start
- When operating the JOC Cockpit as a Windows Service then from the .
\service
directory of the installation run:- for JOC Cockpit:
js7_jocw.exe
- Example:
C:\Program Files\sos-berlin.com\js7\joc\service\js7_jocw.exe
- Example:
- This brings up a utility that allows Java options to be specified:
- Note: The JOC Cockpit Windows Service has to be restarted to apply changes to Java options.
- for JOC Cockpit:
Frequently Used Debug Options
...
- When configuring certificates for secure HTTPS connections with the JOC Cockpit, Controller and Agents then TLS/SSL debug options will provide detailed information e.g. about about, for example, handshaking and the use of certificates.
- Use the Java option:
-Djavax.net.debug=ssl
or-Djavax.net.debug=all
- You will find debug output:
- of TLS/SSL certificate negotiation related to a Controller or Agent in the log file:
watchdog.log
- of general authentication steps in the JOC Cockpit log file:
authentication-debug.log
- of TLS/SSL connections in the JOC Cockpit log file:
jetty.log
.
- of TLS/SSL certificate negotiation related to a Controller or Agent in the log file: