We’ve seen this issue before, in fact there’s a discussion of it here as well. As you said It has to do with the Jboss logmanager. It appears that JMX needs the logging classes before the proper modules are loaded by the JBoss/Wildfly classloader. Thus they need to be made available on the bootstrap classloader for earlier access.
Basically the workaround is to update the
wildfly-n.n.n/bin/standalone.conf file as follows.
A) The first thing is to add certain packages to the JBoss system module loader described here: Jboss Modules - Loader
if [ "x$JBOSS_MODULES_SYSTEM_PKGS" = "x" ]; then
B) Then at the bottom of the standalone.conf add the following config that sets the logmanager and wildfly-common jars on the bootstrap classpath as well as setting the java.util.logging.manager:
This is assuming that the jmx and Java agent config already exist and it’s really just the config that sets the logmanager and wildfly-common * jars on the bootstrap classpath as well as the java.util.logging.manager that would need to be added.
# wildfly install directory (Add your actual path here)
# enable jmx remote
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=7091 -Dcom.sun.management.jmxremote.rmi.port=7091 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
# logmanager jar (update jar version as needed)
# wildfly-common jar (update jar version as needed)
# register jboss logmanager at jvm early startup and add the logmanager and wildfly-common libs to the bootstrap classpath
# For Java 8 and below use -Xbootclasspath/p, for Java 9+ use -Xbootclasspath/a
JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Xbootclasspath/a:$JBOSS_LOG_MANAGER_LIB:$WILDFLY_COMMON_LIB"
# Might be needed, see: https://issues.jboss.org/browse/WFCORE-1494
# Might be needed
Note: For Java 8 and below use -Xbootclasspath/p (the prepend option) and for Java 9+ use -Xbootclasspath/a (the append option) - more about that here: Oracle Java 9 release notes
Note the two lines that are commented out. The
disableCallerCheck might be needed.
Let me know if that works!