-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue in Integrating jmx_prometheus_javaagent with Jboss #1000
Comments
@hemnath83 This issue is caused because a JMX exporter uses Java logging but doesn't use the application's classpath. You will need to modify the application classpath so that the jar(s) required to use Reference: #455 |
Hi @dhoard , Thank you for your response. Below are my complete JVM arguments in startup for your reference. set "JAVA_OPTS=-d64 -Xms6G -Xmx8G -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=1G -Xss1024m"
rem "JAVA_OPTS=%JAVA_OPTS% -verbose:class"
set "JAVA_OPTS=%JAVA_OPTS% -Xbootclasspath/p:$JBOSS_HOME/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-2.1.5.Final-redhat-00001.jar"
set "JAVA_OPTS=%JAVA_OPTS% -XX:+UseG1GC -XX:-UseGCOverheadLimit -XX:+AggressiveOpts -XX:+UseLargePages -XX:G1ReservePercent=20"
rem # set "JAVA_OPTS=-d64 -Xms16G -Xmx16G -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=1024M"
rem # If required context, we can anable the context for log&como for jboss
set "JAVA_OPTS=%JAVA_OPTS% -Dtafj.home=%TAFJ_HOME% -Dfile.encoding=UTF-8 -Dtemenos.log.context=browser -Djbc.debug=9797"
set "JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
set "JAVA_OPTS=%JAVA_OPTS% -verbose:class"
set "JAVA_OPTS=%JAVA_OPTS% -javaagent:C:\\T24\\Area\\Temenos\\prometheus-2.54.1.windows-amd64\\jmx_prometheus_javaagent-0.17.1.jar=8080:C:\\T24\\Area\\Temenos\\prometheus-2.54.1.windows-amd64\\config.yaml"
set "JAVA_OPTS=%JAVA_OPTS% -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=E:\\Dumps\\Dump_KJ"
set "JAVA_OPTS=%JAVA_OPTS% -verbose:gc -Xloggc:jboss.server.log.dir.gc_%p_%t.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:NumberOfGCLogFiles=10 -XX:+UseGCLogFileRotation -XX:GCLogFileSize=50M" Update: formatting @dhoard |
@hemnath83 per #455 is looks like there are multiple jar files required for JBoss logging. You will need to find all jars required. Can you either define an environment variable or Java system property to capture developer debug? This may provide more information. environment variable
Java system property
|
We are running on Jboss EAP 7.2.0 and Java 1.8.
When i tried to integrate jmx_prometheus_javaagent with Jboss facing in loading class file of logger.
Could not load Logmanager "org.jboss.logmanager.LogManager"
java.lang.ClassNotFoundException: org.jboss.logmanager.LogManager
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
However when I comment / remove jmx_prometheus_javaagent-0.17.1.jar then jboss is starting without issue and i checked the logs the class of logmanger is getting loaded properly without jmx agent config.
"JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
"JAVA_OPTS=%JAVA_OPTS% -javaagent:C:\T24\Area\Temenos\prometheus-2.54.1.windows-amd64\jmx_prometheus_javaagent-0.17.1.jar=8080:C:\T24\Area\Temenos\prometheus-2.54.1.windows-amd64\config.yaml"
The text was updated successfully, but these errors were encountered: