inspectIT / inspectit-ocelot

inspectIT Ocelot - Java agent for collecting application performance, tracing and behavior data
http://www.inspectit.rocks/
Apache License 2.0
204 stars 69 forks source link

[Feature] - Since 2.0.0 Wildfy Server refuses to start #1465

Closed ClaudioWaldvogel closed 2 years ago

ClaudioWaldvogel commented 2 years ago

Is your feature request related to a problem? Please describe. Since version 2.0.0 Ocelot Agent prevents Wildfly servers from starting. rocks.inspectit.ocelot.agent.AgentMain initializes the logging system - but Wildfly is very stubborn at this point and expects org.jboss.logmanager.LogManager as LogManager. This is a common problem when using Java agents with Wildfly.

Caused by: java.lang.IllegalStateException: WFLYLOG0078: The logging subsystem requires the log manager to be org.jboss.logmanager.LogManager. The subsystem has not be initialized and cannot be used. To use JBoss Log Manager you must add the system property "java.util.logging.manager" and set it to "org.jboss.logmanager.LogManager" at org.jboss.as.logging.LoggingExtension.initialize(LoggingExtension.java:195) at org.jboss.as.controller.extension.ExtensionAddHandler.initializeExtension(ExtensionAddHandler.java:131) at org.jboss.as.controller.extension.ExtensionAddHandler.initializeExtension(ExtensionAddHandler.java:103) at org.jboss.as.controller.extension.ParallelExtensionAddHandler$ExtensionInitializeTask.call(ParallelExtensionAddHandler.java:144) at org.jboss.as.controller.extension.ParallelExtensionAddHandler$ExtensionInitializeTask.call(ParallelExtensionAddHandler.java:127) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377) at java.lang.Thread.run(Thread.java:748) at org.jboss.threads.JBossThread.run(JBossThread.java:508)

Describe the solution you'd like Update documentation how to configure Wildfly properly.

Java 8

-Djava.util.logging.manager=org.jboss.logmanager.LogManager
-Djboss.modules.system.pkgs=org.jboss.byteman,org.jboss.logmanager  
-Xbootclasspath/p:<WILDFLY_HOME>/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-<version>.jar  
-Xbootclasspath/p::<WILDFLY_HOME>/modules/system/layers/base/org/wildfly/common/main/wildfly-common-<version>.jar
-javaagent:inspectit-ocelot-agent.jar

Java 11

-Dsun.util.logging.disableCallerCheck=true
-Djava.util.logging.manager=org.jboss.logmanager.LogManager
-Djboss.modules.system.pkgs=org.jboss.byteman,org.jboss.logmanager
-Xbootclasspath/p:<WILDFLY_HOME>/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-<version>.jar
-Xbootclasspath/p::<WILDFLY_HOME>/modules/system/layers/base/org/wildfly/common/main/wildfly-common-<version>.jar
-javaagent:inspectit-ocelot-agent.jar