Im running SonarQube 8.9 on a container…
set env value:
SONAR_WEB_JAVAADDITIONALOPTS: “-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.port=10443 -Dcom.sun.management.jmxremote.rmi.port=10444 -Dcom.sun.management.jmxremote.password.file=/opt/sonarqube/extensions/jmxremote.password -Dcom.sun.management.jmxremote.access.file=/opt/sonarqube/extensions/jmxremote.access”
And run the container exposing 10443 and 10444.
Datadog Agent is running in the host, so i configure the check like:
Web JMX instance
- is_jmx: true
host: localhost
port: 10443
user: admin # Defined in SonarQube’s sonar.properties file
password: adminpassword # Defined in SonarQube’s sonar.properties file
Compute Engine JMX instance
- is_jmx: true
host: localhost
port: 10444
user: admin # Defined in SonarQube’s sonar.properties file
password: adminpassword # Defined in SonarQube’s sonar.properties file
But i get the error:
2021-11-24 15:48:02 GMT | JMX | WARN | App | Unable to instantiate or initialize instance localhost:10444. Is the target JMX Server or JVM running? Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.NoSuchObjectException: no such object in table]
JMX is not running on localhost, but in the container, but localhostÞ:10444 should be accessible.
Any suggestion?