We're updating the issue view to help you get more done. 

configuring javagent with jboss eap 6.4.15

Description

hi,

i am new in inspectIT.
since 2 days i tried to configure inspectIT javaagent on my jboss eap 6.4.15 instance but i am confronted to an issue with the logmanager.
i tried a lot of java opts like it is wrote in documentation 1.8 but no good result.

i am in domain mode but for my test i set java opts and system property in host-slave.xml (i did that for appdynamics and it works fine and when i saw inspectIT configuration, it seems to be the same).

when i set like that =>

<option value="-Xbootclasspath/p:/opt/inspectIT/agent/inspectit-agent.jar"/>
<option value="-javaagent:/opt/inspectIT/agent/inspectit-agent.jar"/>
<option value="-Dinspectit.repository=10.76.21.83:8182"/>
<option value="-Dinspectit.agent.name=TEST_LUDO"/>

i received this error =>

[root@s2jbossppr1 ~]# service jboss-as-APMSLAVE.sh start
Starting jboss-as: [Server:SG_IHMS_APM_node1] Apr 25, 2018 10:08:04 AM rocks.inspectit.agent.java.javaagent.JavaAgent premain
[Server:SG_IHMS_APM_node1] INFO: inspectIT Agent: Starting initialization...
[Server:SG_IHMS_APM_node1] Apr 25, 2018 10:08:14 AM rocks.inspectit.agent.java.javaagent.JavaAgent preloadClasses
[Server:SG_IHMS_APM_node1] INFO: Preloading classes ...
[Server:SG_IHMS_APM_node1] Apr 25, 2018 10:08:14 AM rocks.inspectit.agent.java.javaagent.JavaAgent preloadClasses
[Server:SG_IHMS_APM_node1] INFO: Preloading classes complete...
[Server:SG_IHMS_APM_node1] Apr 25, 2018 10:08:14 AM rocks.inspectit.agent.java.javaagent.JavaAgent premain
[Server:SG_IHMS_APM_node1] INFO: inspectIT Agent: Initialization complete...
[Server:SG_IHMS_APM_node1] WARNING: Failed to load the specified log manager class org.jboss.logmanager.LogManager
[Server:SG_IHMS_APM_node1] Exception in thread "main" java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" system property to "org.jboss.logmanager.LogManager")
[Server:SG_IHMS_APM_node1] at org.jboss.logmanager.Logger.getLogger(Logger.java:58)
[Server:SG_IHMS_APM_node1] at org.jboss.as.server.DomainServerMain.main(DomainServerMain.java:88)
[Server:SG_IHMS_APM_node1] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[Server:SG_IHMS_APM_node1] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[Server:SG_IHMS_APM_node1] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[Server:SG_IHMS_APM_node1] at java.lang.reflect.Method.invoke(Method.java:498)
[Server:SG_IHMS_APM_node1] at org.jboss.modules.Module.run(Module.java:312)
[Server:SG_IHMS_APM_node1] at org.jboss.modules.Main.main(Main.java:473)
[ OK ]
[root@s2jbossppr1 ~]#

i added so =>

<property name="jboss.modules.system.pkgs" value="org.jboss.logmanager"/>

i received this error =>

[root@s2jbossppr1 ~]# service jboss-as-APMSLAVE.sh start
Starting jboss-as: [Server:SG_IHMS_APM_node1] Apr 25, 2018 10:09:55 AM rocks.inspectit.agent.java.javaagent.JavaAgent premain
[Server:SG_IHMS_APM_node1] INFO: inspectIT Agent: Starting initialization...
[Server:SG_IHMS_APM_node1] Apr 25, 2018 10:10:04 AM rocks.inspectit.agent.java.javaagent.JavaAgent preloadClasses
[Server:SG_IHMS_APM_node1] INFO: Preloading classes ...
[Server:SG_IHMS_APM_node1] Apr 25, 2018 10:10:04 AM rocks.inspectit.agent.java.javaagent.JavaAgent preloadClasses
[Server:SG_IHMS_APM_node1] INFO: Preloading classes complete...
[Server:SG_IHMS_APM_node1] Apr 25, 2018 10:10:04 AM rocks.inspectit.agent.java.javaagent.JavaAgent premain
[Server:SG_IHMS_APM_node1] INFO: inspectIT Agent: Initialization complete...
[Server:SG_IHMS_APM_node1] WARNING: Failed to load the specified log manager class org.jboss.logmanager.LogManager
[Server:SG_IHMS_APM_node1] Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/logmanager/Level
[Server:SG_IHMS_APM_node1] at java.lang.Class.forName0(Native Method)
[Server:SG_IHMS_APM_node1] at java.lang.Class.forName(Class.java:348)
[Server:SG_IHMS_APM_node1] at org.jboss.modules.Module.run(Module.java:302)
[Server:SG_IHMS_APM_node1] at org.jboss.modules.Main.main(Main.java:473)
[Server:SG_IHMS_APM_node1] Caused by: java.lang.ClassNotFoundException: org.jboss.logmanager.Level
[Server:SG_IHMS_APM_node1] at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
[Server:SG_IHMS_APM_node1] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[Server:SG_IHMS_APM_node1] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
[Server:SG_IHMS_APM_node1] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[Server:SG_IHMS_APM_node1] at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:386)
[Server:SG_IHMS_APM_node1] at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134)
[Server:SG_IHMS_APM_node1] ... 4 more
[ OK ]
[root@s2jbossppr1 ~]#

i tried to set =>

<option value="-Djava.util.logging.manager=org.jboss.logmanager.LogManager"/>
<option value="Xbootclasspath/p:/app_apm/middleware/jboss-eap-6.4/modules/system/layers/base/org/jboss/logmanager/main/jboss logmanager-1.5.4.Final-redhat-1.jar"/>
<option value="-Xbootclasspath/p:/app_apm/middleware/jboss-eap-6.4/modules/system/layers/base/org/jboss/log4j/logmanager/main/log4j-jboss-logmanager-1.1.1.Final-redhat-1.jar"/>

but the service didn't start =>

[root@s2jbossppr1 ~]# service jboss-as-APMSLAVE.sh start
Starting jboss-as: jboss-as failed to startup in the time allotted
[FAILED]
[root@s2jbossppr1 ~]#

notice that for me in jboss eap 6.4.15, this jar is not present :

<option value="-Xbootclasspath/p:$JBOSS_HOME/modules/org/apache/log4j/main/log4j-xxxxxx.jar""/>

can you help me about this issue.
i have the same issue with appdynamics javaagent 4.4 version and it seems that the logmamanger is very problematic for apm agent.

thanks a lot

ludo

Environment

None

Status

Assignee

Unassigned

Reporter

Ludovic LACHEVRE

Pull Request

None

Integrator

None

Affects versions

1.8.5

Priority

Medium