JMX remote monitoring on Linux

When running Java based application servers such as JBoss or Tomcat it is essential to monitor the status of the process – it’s memory consumption, threads and so on. In order to do that, Sun had introduced the JConsole application in Java 5, and now we have its successor visualvm.

In order to monitor the java process, you need to add the following system properties to the command line:

In the visualvm you just use the connection string host:9999.

However, sometimes the RMI listener listens to the wrong IP address, one which is inaccessible to the visualvm. Thanks to Pavel’s tip, I found a  way to overcome this is by adding the following parameters:


Now it works like a charm!

For completeness, I’d mention you can secure the connection to the JVM, either by requiring user/password or by using SSL. If you are interested, please see this guide.

3 thoughts on “JMX remote monitoring on Linux

  1. Petar Ivanov

    Thank you very much.It works.I`ve spent 3 days of searching how to fix this and after reading this article I`ve made it.Thank you very much.

  2. Joan

    Be careful if you have the -b ${IP_ADRESS} in java opts cause it can produce troubles on jmx port binding.
    Probably you have to change the $(hostname) to the defined binding adress.



Leave a Reply

Your email address will not be published. Required fields are marked *