[jboss-jira] [JBoss JIRA] (WFLY-13667) Prometheus JMX exporter jar, stops starting the wildfly server.

Rakesh Kumar Shah (Jira) issues at jboss.org
Tue Jul 14 10:54:00 EDT 2020


     [ https://issues.redhat.com/browse/WFLY-13667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rakesh Kumar Shah updated WFLY-13667:
-------------------------------------
    Steps to Reproduce: 
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% {color:#4c9aff}Xbootclasspath/a{color}:%JBOSS_HOME%/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager*.jar {color:#4c9aff}-Djava.util.logging.manager{color}=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..

 

 

  was:
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% -{color:#4c9aff}Xbootclasspath/a{color}:%JBOSS_HOME%/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-*.jar {color:#4c9aff}-Djava.util.logging.manager{color}=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..

 

 

 

Execute standalone.bar and above exception is observed. 

 



> Prometheus JMX exporter jar, stops starting the wildfly server. 
> ----------------------------------------------------------------
>
>                 Key: WFLY-13667
>                 URL: https://issues.redhat.com/browse/WFLY-13667
>             Project: WildFly
>          Issue Type: Bug
>          Components: Logging
>    Affects Versions: 20.0.1.Final
>            Reporter: Rakesh Kumar Shah
>            Assignee: James Perkins
>            Priority: Major
>
> 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)



--
This message was sent by Atlassian Jira
(v7.13.8#713008)



More information about the jboss-jira mailing list