Page History
...
- By default JS7 components 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 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 to be restarted.
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<?xml version="1.0" encoding="UTF-8"?> <configuration status="WARN" shutdownHook="disable"> <Properties> <Property name="TimeZone">${env:JS7_CONTROLLER_TZ:-Etc/UTC}</Property> <Property name="LogDir">${env:JS7_CONTROLLER_LOGS:-logs}</Property> <Property name="LogBasename">${env:JS7_CONTROLLER_APPNAME:-controller}</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> <!-- 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> |
Explanation:
- The Controller and Agent Log4j2 configuration file is files are the same for Controllers and Agents 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 modify , change the
<property name="RootLogLevel">INFO</property>
and<property name="LogLevelOfDebugLog">OFF</property>
toDEBUG.
...
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="ServiceClusterLogLevel">OFF</Property> <Property name="ServiceHistoryLogLevel">OFF</Property> <Property name="ServiceDailyPlanLogLevel">OFF</Property> <Property name="ServiceCleanupLogLevel">OFF</Property> <Property name="ServiceMonitorLogLevel">OFF</Property> <Property name="AuthLogLevel">OFF</Property> <Property name="ConnectionPoolLogLevel">OFF</Property> </Properties> ... <Configuration> |
Explanation:
- 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 to enable debug output with the respective debug log file:Debug Log File Property joc-debug.log
<Property name="JocLogLevel">DEBUG</Property>
service-cluster-debug.log
<Property name="ServiceClusterLogLevel">DEBUG</Property>
service-history-debug.log
<Property name="ServiceHistoryLogLevel">DEBUG</Property>
service-dailyplan-debug.log
<Property name="ServiceDailyPlanLogLevel">DEBUG</Property>
service-cleanup-debug.log
<Property name="ServiceCleanupLogLevel">DEBUG</Property>
service-monitor-debug.log
<Property name="ServiceMonitorLogLevel">DEBUG</Property>
authentication-debug.log
<Property name="AuthLogLevel">DEBUG</Property>
connection-pool-debug.log
<Property name="ConnectionPoolLogLevel">DEBUG</Property>
...
When switching to higher log levels such as DEBUG, TRACE then consider the increased storage consumption.
By default JS7 components are configured to limit storage consumption and to limit the retention period for log files. Refer to the instructions in the JS7 - Log Rotation article to adjust settings for the max. log file size and retention period.
...
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 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 see the JS7 - Log Files and Locations article.
Unix Operating Systems
For Unix, the JAVA_OPTIONS
environment variable can be set before running the Controller or Agent start script like thisscripts as follows:
From the Unix command line or from the Controller instance, start script the
controller_<instance>.sh
script:Code Block language bash title Unix example to run the Controller start script with debug options # Set debug options before running the Controller start script export JAVA_OPTIONS="-Djavax.net.debug=ssl" ./controller.sh start # Alternatively set debug options when running the Controller start script ./controller.sh 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 start script
agentagent_4445.sh
start script (assuming that port4445
is used for the Agent):Code Block language bash title Unix example to run the Agent start script with debug options # Set debug options before running the Agent start script export JAVA_OPTIONS="-Djavax.net.debug=ssl" ./agent.sh start # Alternatively set debug options when running the Agent start script ./agent.sh start --java-options="-Djavax.net.debug=ssl" # 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, the JAVA_OPTIONS
environment variable can be set before running the Controller or Agent start script like thisscripts as follows:
From the Windows command line or from the Controller instance start script the
controller_<instance>.cmd
script: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 set JAVA_OPTIONS="-Djavax.net.debug=ssl" .\controller.cmd start @rem Alternatively set debug options when running the Controller start script .\controller.cmd 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 script the
agent_4445.cmd
script (assuming that port4445
is used for the Agent):Code Block language bash title Windows example to run the Agent instance start script with debug options @rem Set debug options before running the Agent start script frm the command line set JAVA_OPTIONS="-Djavax.net.debug=ssl" .\agent.cmd start @rem Alternatively set debug options when running the Agent start script .\agent.cmd start --java-options="-Djavax.net.debug=ssl" @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"
- Alternatively, when operating the Controller or Agent 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 forwith. - Example:
C:\Program Files\sos-berlin.com\js7\controller\my-controller\service\js7_controller_mycontrollerw.exe
- where
- for an Agent:
js7_agent_<port>w.exe
- where
<port>
corresponds to the port that the Agent is operated foron. - Example:
C:\Program Files\sos-berlin.com\js7\agent_4445\service\js7_agent_4445w.exe
- where
- This brings up a utility that allows Java options to be specified:
- Note: The Controller or Agent Windows Service has to be restarted to apply changes to Java options.
- for a Controller:
...
Output created from Java debug options is written to the stdout channel and is therefore is added to the jetty.log
file in the JOC Cockpit's logs
directory, see 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
$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 can be created created by the user (requires root permission) by the user. This file is not created by the installer , it 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 like thisas follows:
Only when JOC Cockpit is not installed as Windows Service then the 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:
...
- 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
- Find You will find debug output:
- of TLS/SSL certificate negotiation related to a Controller or Agent with in the log file:
watchdog.log
- of general authentication steps with in the JOC Cockpit log file:
authentication-debug.log
- of TLS/SSL connections with in the JOC Cockpit log file:
jetty.log
.
- of TLS/SSL certificate negotiation related to a Controller or Agent with in the log file: