Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-5053

Prometheus JMX exporter jar, stops starting the wildfly server.

XMLWordPrintable

    • Hide

      1. Download JMX exporter jar from https://github.com/prometheus/jmx_exporter

      2. The version of the jar is jmx_prometheus_javaagent-0.13.0.jar 

      3. Download wildfly 20.0.1.final and extract on the windows system. 

      4. Modify standalone.bat on line no 123 as below,

      set "JAVA_OPTS=%JAVA_OPTS% Xbootclasspath/a:%JBOSS_HOME%/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager*.jar -Djava.util.logging.manager=org.jboss.logmanager.LogManager -j-avaagent:%JBOSS_HOME%\jmx_prometheus_javaagent-.13.0.jar=9080:%JBOSS_HOME%\domain\configuration\config.yaml"

      5. In standalone.conf.bat file line no 56 added log manager 

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

      6. Execute standalone.bat and above exception comes on the console..

       

       

      Show
      1. Download JMX exporter jar from  https://github.com/prometheus/jmx_exporter .  2. The version of the jar is jmx_prometheus_javaagent-0.13.0.jar  3. Download wildfly 20.0.1.final and extract on the windows system.  4. Modify standalone.bat on line no 123 as below, set "JAVA_OPTS=%JAVA_OPTS% Xbootclasspath/a :%JBOSS_HOME%/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager*.jar -Djava.util.logging.manager =org.jboss.logmanager.LogManager -j-avaagent:%JBOSS_HOME%\jmx_prometheus_javaagent-.13.0.jar=9080:%JBOSS_HOME%\domain\configuration\config.yaml" 5. In standalone.conf.bat file line no 56 added log manager  set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.byteman, org.jboss.logmanager " 6. Execute standalone.bat and above exception comes on the console..    

      Trying to integrate the Prometheus JMX exporter with wildfly.  After spending lot of time and work around it, wildfly is not starting.  It throws following exception. 

      java.lang.ClassNotFoundException: org.jboss.logmanager.LogManager
       at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
       at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
       at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
       at java.logging/java.util.logging.LogManager$1.run(LogManager.java:239)
       at java.logging/java.util.logging.LogManager$1.run(LogManager.java:223)
       at java.base/java.security.AccessController.doPrivileged(Native Method)
       at java.logging/java.util.logging.LogManager.<clinit>(LogManager.java:223)
       at java.logging/java.util.logging.Logger.demandLogger(Logger.java:648)
       at java.logging/java.util.logging.Logger.getLogger(Logger.java:717)
       at java.logging/java.util.logging.Logger.getLogger(Logger.java:701)
       at io.prometheus.jmx.shaded.io.prometheus.jmx.JmxCollector.<clinit>(JmxCollector.java:39)
       at io.prometheus.jmx.shaded.io.prometheus.jmx.JavaAgent.premain(JavaAgent.java:29)
       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
       at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.base/java.lang.reflect.Method.invoke(Method.java:566)
       at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:513)
       at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:525)
      WARNING: Failed to load the specified log manager class org.jboss.logmanager.LogManager
      Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/logmanager/Level
       at java.base/java.lang.Class.forName0(Native Method)
       at java.base/java.lang.Class.forName(Class.java:398)
       at org.jboss.modules.Module.run(Module.java:340)
       at org.jboss.modules.Module.run(Module.java:320)
       at org.jboss.modules.Main.main(Main.java:617)
      Caused by: java.lang.ClassNotFoundException: org.jboss.logmanager.Level
       at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
       at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
       at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
       at org.jboss.modules.JDKSpecific.getSystemClass(JDKSpecific.java:183)
       at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:395)
       at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
      

              jperkins-rhn James Perkins
              rakesh.shah1977 Rakesh Kumar Shah (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: