Failed to register Collector of type BuildInfoCollector: jmx_exporter_build_info is already in use by another Collector of type BuildInfoCollector
ImChoison opened this issue · comments
I conf in env.sh
-javaagent:/usr/install/jmx/jmx_prometheus_javaagent-0.19.0.jar=8383:/usr/install/jmx/dn.yaml
but when i run , alwrays has this error
Usage: -javaagent:/path/to/JavaAgent.jar=[host:]: Failed to register Collector of type BuildInfoCollector: jmx_exporter_build_info is already in use by another Collector of type BuildInfoCollector
i only run an javaagent in this
This should only happen if you try to load the Java agent twice into the same JVM. I would start by looking at the final command line (java ...
) that is created.
This should only happen if you try to load the Java agent twice into the same JVM. I would start by looking at the final command line (
java ...
) that is created.
Unbeliveable but this was true. IntelliJ tends to duplicate command line arguments VM options. Which then caused this issue of "jmx_exporter_build_info is already in use". I whish IntelliJ to fixes this issue: https://youtrack.jetbrains.com/issue/IDEA-322835/Duplicated-VM-options-when-starting-java-application-using-the-Gradle-runner