Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

With the Wildfly WildFly version 8 and above there is the problem with the logging when an agent that uses the java.util.logging is started with the WildflyWildFly. This problem is filled as the bug on the JBoss issue tracking system. "This is because the java agent does not have access to jboss-logmanager classes, so even if the java.util.logging.manager property is set the classes will not be available." The problem will appear when inspectIT is used as the agent:

...

This page describes how to set up the Wildfly WildFly 8.x.x - 10.x.x with the inspectIT agent and overcome the problem.

Configuration

Linux

The configuration is quite simple. Only needed thing is to edit the standalone.conf file (if you start with run standalone.sh start script).

...

Code Block
# Added for logging problem
JBOSS_MODULES_SYSTEM_PKGS="org.jboss.logmanager,rocks.inspectit"

At the end of the file add the following to solve the logging problem.

Code Block
# Added for logging problem
JBOSS_HOME="[path-to-jboss-folder]"
JBOSS_LOGMANAGER_VERSION="1.5.2.Final"
JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Xbootclasspath/p:$JBOSS_HOME/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-1.5.2.Final.jar -Xbootclasspath/p:$JBOSS_HOME/modules/system/layers/base/org/jboss/log4j/logmanager/main/log4j-jboss-logmanager-1.1.0.Final.jar$JBOSS_LOGMANAGER_VERSION.jar"
Warning

Above JBOSS_LOGMANAGER_VERSION relates to WildFly version 8.2.1-FINAL. If you are using another WildFly version please make sure that the JBOSS_LOGMANAGER_VERSION is adapted correctly.

At the end of the file we can also integrate the inspectIT related options:

Code Block
# inspectIT Settings
INSPECTIT_AGENT_HOME="[path-to-inspectit-agent-home]"
INSPECTIT_ADRESS="[IP]:[PORT]"
INSPECTIT_AGENT_NAME="[agent-name]"
INSPECTIT_JAVA_OPTS="-Xbootclasspath/p:${INSPECTIT_AGENT_HOME}/inspectit-agent.jar -javaagent:${INSPECTIT_AGENT_HOME}/inspectit-agent.jar -Dinspectit.repository=${INSPECTIT_ADRESS} -Dinspectit.agent.name=${INSPECTIT_AGENT_NAME}"
JAVA_OPTS="${INSPECTIT_JAVA_OPTS} ${JAVA_OPTS}"


Windows

The configuration is quite simple. Only needed thing is to edit the standalone.conf.bat file (if you start with run standalone.sh start script).


Find the following line

Code Block
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.byteman"

Replace this line with the following:

Code Block
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.byteman,org.jboss.logmanager,rocks.inspectit.agent.java"

At the end of the file add the following to solve the logging problem.

Code Block
# Added for logging problem
set "JBOSS_HOME=[path-to-jboss-folder]"
set "JBOSS_LOGMANAGER_VERSION=1.5.2.Final"
set "JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Xbootclasspath/p:$JBOSS%JBOSS_HOMEHOME%/modules/system/layers/base/org/jboss/logginglogmanager/main/jboss-logging-3.1.4.GA.logmanager-%JBOSS_LOGMANAGER_VERSION%.jar"
Warning

Above paths to JAR files relate to Wildfly Above JBOSS_LOGMANAGER_VERSION relates to WildFly version 8.2.1-FINAL. If you are using another WildFly version please make sure that the paths to JARs are correctthe JBOSS_LOGMANAGER_VERSION is adapted correctly.

At the end of the file we can also integrate the inspectIT related options:

Code Block
# inspectIT Settings
set "INSPECTIT_AGENT_HOME="[path-to-inspectit-agent-home]"
set "INSPECTIT_ADRESS=[IP]:[PORT]"
set "INSPECTIT_CONFIGAGENT_HOMENAME="[path-to-config-folderagent-name]"
set "INSPECTIT_JAVA_OPTS="-Xbootclasspath/p:${INSPECTIT%INSPECTIT_AGENT_HOME}HOME%/inspectit-agent.jar -javaagent:${INSPECTIT%INSPECTIT_AGENT_HOME}HOME%/inspectit-agent.jar -Dinspectit.repository=%INSPECTIT_ADRESS% -Dinspectit.config=${INSPECTIT_CONFIG_HOME}"
agent.name=%INSPECTIT_AGENT_NAME%"
set "JAVA_OPTS="${INSPECTIT%INSPECTIT_JAVA_OPTS} ${JAVA_OPTS}"

 

...

_OPTS% %JAVA_OPTS%"
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.byteman"