Monitoring SonarQube

  • Enterprise Edition Version 7.9.3

  • We are currently using JMX mbeans to monitor our service.

  • We have updated sonar.properties file as mentioned here.
    Restarted sonarqube. Initially we were seeing issue when trying to use same jmx port for web and compute engine both. I believe this could be because once the web is activated , the port are already occupied.
    so currently we have this configuration in for web -
    sonar.web.javaAdditionalOpts=-Djavax.net.ssl.trustStore=/mnt/disks/sonar/sonarqube-7.9.3/conf/cacerts -Djavax.net.ssl.trustStorePassword=changeit -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=/mnt/disks/sdb/sonarqube-7.9.3/conf/jmxremote.password -Dcom.sun.management.jmxremote.access.file=/mnt/disks/sdb/sonarqube-7.9.3/conf/jmxremote.accesssonar.web.javaAdditionalOpts=-Djavax.net.ssl.trustStore=/mnt/disks/sonar/sonarqube-7.9.3/conf/cacerts -Djavax.net.ssl.trustStorePassword=changeit -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=/mnt/disks/sdb/sonarqube-7.9.3/conf/jmxremote.password -Dcom.sun.management.jmxremote.access.file=/mnt/disks/sdb/sonarqube-7.9.3/conf/jmxremote.access

and for compute engine we have-

sonar.ce.javaOpts=-Xmx2G -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.port=8998 -Dcom.sun.management.jmxremote.rmi.port=8999 -Dcom.sun.management.jmxremote.password.file=/mnt/disks/sdb/sonarqube-7.9.3/conf/jmxremote.password -Dcom.sun.management.jmxremote.access.file=/mnt/disks/sdb/sonarqube-7.9.3/conf/jmxremote.access

where the jmxremote password and access file are same as described in the documentation .

After bringing up the SonarQube successfully, i could see the corresponding ports are occupied. But not sure how to check jconsole here. I tried running jconsole in the jdk bin but it was coming as blank. It would be really helpful if anyone can suggest me here.

Hi Amisha

Please note that SonarQube v8.9 is now the minimum supported version of SonarQube. You should consider an upgrade at your earliest convenience.

You are following the right instructions and appears it you have SonarQube watching for remote JMX connections.

Usually jconsole hostName:portNum will bring up a list of processes on the host, but JConsole is not the best tool for troubleshooting connections. For more about how to use Oracle’s JConsole, see their Monitoring and Management Using JMX Technology.

The open source project VisualVM (the “All-in-One Java Troubleshooting Tool”) may give you better UI and logs, to diagnose what is going on.


Monty