prometheus / jmx_exporter

A process for exposing JMX Beans via HTTP for Prometheus consumption
Apache License 2.0
2.97k stars 1.19k forks source link

Application in wildfly server crashing when adding jmx_prometheus_javaagent-0.18.0.jar while using YAJSW Wrapper for configuration. #807

Open jp2501 opened 1 year ago

jp2501 commented 1 year ago

We have configured an application in wildfly server using YAJSW wrapper. we have added following command in wrapper.conf file wrapper.java.additional.xx = -javaagent:path/to/jmx_prometheus_javaagent-0.18.0.jar=12345:/path/to/config.yaml

When we start the application it crashes after sometime and no reason could be found in logs.

When we run the application in console mode using following command the application works perfectly and also exports metrics which can be viewed in promtheus dashboard. sudo java -javaagent:path/to/jmx_prometheus_javaagent-0.18.0.jar=12345/path/to/:config.yaml -jar wrapper.jar -c /path/to/wrapper.conf

Can anyone help what could be the reason of application crashing and how it can be resolved.

dhoard commented 1 year ago

Do you have a heap dump from the crash? Given the application and exporter work as expected from the console, I suspect it's a bug in YAJSW.