Datadog JMX Issue

Hi Team,

I am trying to Integrate monitoring Sonarqube with Datadaog, regarding that I have done the JMX integration part and updated the required details , I have followed the below urls

But After the changes , When I looked into datadog-agent status I got the below Error under JMX check , Can you please help us fix the issue

message : Unable to instantiate or initialize instance jmx_instance. Is the target JMX Server or JVM running? Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused (Connection refused)]
metric_count : 0
service_check_count : 0
status : ERROR
instance_name : jmx_instance

Can you please help us What additional details we have missed here ?

Hi Team,

Any update on the above issue , I am facing issues regarding sonarqube Integration with Datadog, Any help on this is highly appreciated

Team,
Hoping to have some response on this Issue , Can you please let me know What needs to be done regarding the Issue ?

Hi @vinodkumar4b9 ,

looks like you should raise this toppic with the datadog support.

sounds like a configuration problem, or something related to the way datadog is trying to access the jmx metrics to me.

Hi Tobias,

Thanks for the details on this , I will check with Datadog team on this , But I have an another question here , In order to activate JMX remote connection I have followed the documentation (Monitoring | SonarQube Docs) And I have even updated sonar.properties file as below

For Web server:

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/sonarsource/sonar/conf/jmxremote.password -Dcom.sun.management.jmxremote.access.file=/opt/sonarsource/sonar/conf/jmxremote.access

And I feel There is no changes required regarding for compute Engine as you have mentioned There is no specific javaAdditionalOpts entry, simply amend sonar.ce.javaOpts, So I guess there was nothing I have done .

And I have even created password and access file in the below location /opt/sonarsource/sonar/conf/jmxremote.password and even gave CHMOD 600 for password file as mentioned in Docs , But After that When I restart Sonarqube , It is giving me the below error

Error: Password file not readable: /opt/sonarsource/sonar/conf/jmxremote.password
jvm 1 | sun.management.AgentConfigurationError
jvm 1 | at sun.management.jmxremote.ConnectorBootstrap.checkPasswordFile(ConnectorBootstrap.java:567)
jvm 1 | at sun.management.jmxremote.ConnectorBootstrap.startRemoteConnectorServer(ConnectorBootstrap.java:426)
jvm 1 | at sun.management.Agent.startAgent(Agent.java:262)
jvm 1 | at sun.management.Agent.startAgent(Agent.java:452)
jvm 1 | 2021.02.11 10:28:53 WARN app[o.s.a.p.AbstractProcessMonitor] Process exited with exit value [web]: 1
jvm 1 | 2021.02.11 10:28:53 INFO app[o.s.a.SchedulerImpl] Process [web] is stopped
jvm 1 | 2021.02.11 10:28:53 INFO app[o.s.a.SchedulerImpl] Process [es] is stopped
jvm 1 | 2021.02.11 10:28:53 WARN app[o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 143
jvm 1 | 2021.02.11 10:28:53 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped

Can you please tell us what we are doing wrong here ?

And one more thing is that if I will set Jmx.remoteauthenticate=false as below , It is working fine and there was No issues.

sonar.web.javaAdditionalOpts=-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=10443 -Dcom.sun.management.jmxremote.rmi.port=10444

Can you please let me Why I am getting the error as per details from sonarqube Docs , DO I need to update anything else ?? or Do I need to apply any permissions ?

if Not Is It ok if I mention Jmx.remoteauthenticate=false. Please let me know if you need any additional details on this .

is the owner of this file the same one that is running sonarqube? chmod 600 sets the file permissions to read/write only for the user that owns the file. if you have created this file with another user account and set the permissions this file becomes unreadable for everyone else, including the user that runs sonarqube.

Hi Tobias,

Thanks for the details on this , May Be i guess there might be an issue regarding the owner as you said , let me check and get back to you on this

Hi Tobias,

Thanks for this and you are correct and It is working now as Expected as I need to change the details here. Issue is regarding the user which I have created those files.

Thanks for your comments on this.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.