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

Failed to register Collector of type BuildInfoCollector: jmx_exporter_build_info is already in use by another Collector of type BuildInfoCollector #888

Closed
ImChoison opened this issue Nov 14, 2023 · 2 comments

Comments

@ImChoison
Copy link

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

@dhoard
Copy link
Collaborator

dhoard commented Nov 14, 2023

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.

@idovak
Copy link

idovak commented Apr 23, 2024

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

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

3 participants