You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have two jmx config files that match (via autodiscovery) a single JVM. During startup, we sometime see errors in the datadog agent log like (note that there are two different checks, check1 and check2):
2019-10-22 15:05:31 UTC | CORE | INFO | (pkg/jmxfetch/jmxfetch.go:216 in func1) | 2019-10-22 15:05:31,684 | INFO | App | Could not initialize instance: check1-x.x.x.x-yyyy: java.util.concurrent.ExecutionException: java.io.IOException: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: x.x.x.x; nested exception is:
2019-10-22 15:05:31 UTC | CORE | INFO | (pkg/jmxfetch/jmxfetch.go:216 in func1) | 2019-10-22 15:05:31,684 | INFO | App | Could not initialize instance: check2-x.x.x.x-yyyy: java.util.concurrent.ExecutionException: java.io.IOException: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: x.x.x.x; nested exception is:
Looking at App.java, two lines after that message, the instance is put in brokenInstanceMap:
We tried to set Instance.getName() to something unique (see below), but that didn't solve the problem because Instance.toString() doesn't take into account the name...
With #255, I've merged the change to the Instance.toString() method in order to use the configured instance name if one has been provided. I've also released JMXFetch 0.33.1 to ship this change.
It will be available starting with the Datadog Agent 6.16.0 (PR: DataDog/datadog-agent#4530) which should be released soon.
We have two jmx config files that match (via autodiscovery) a single JVM. During startup, we sometime see errors in the datadog agent log like (note that there are two different checks,
check1
andcheck2
):Looking at App.java, two lines after that message, the instance is put in
brokenInstanceMap
:jmxfetch/src/main/java/org/datadog/jmxfetch/App.java
Lines 1032 to 1036 in f59dace
In our case,
instance.toString()
resolves to${host}:${port}
, which is not unique across the two checks:jmxfetch/src/main/java/org/datadog/jmxfetch/Instance.java
Line 395 in f59dace
We tried to set
Instance.getName()
to something unique (see below), but that didn't solve the problem becauseInstance.toString()
doesn't take into account the name...A workaround is to combine the two JMX check configs into a single file.
The text was updated successfully, but these errors were encountered: