Skip to content
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

Open
hemnath83 opened this issue Sep 18, 2024 · 1 comment
Open

Issue in Integrating jmx_prometheus_javaagent with Jboss #1000

hemnath83 opened this issue Sep 18, 2024 · 1 comment

Comments

@hemnath83
Copy link

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"

@dhoard
Copy link
Collaborator

dhoard commented Sep 20, 2024

@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 org.jboss.logmanager.LogManager are available to the Java agent classloader.

Reference: #455

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants