How to activate JMX on a JVM for access with jconsole?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The relevant documentation can be found here:
http://java.sun.com/javase/6/docs/technotes/guides/management/agent.html
Start your program with following parameters:
For instance like this:
-Dcom.sun.management.jmxremote.local.only=falseis not necessarily requiredbut without it, it doesn’t work on Ubuntu. The error would be something like
this:
see https://bugs.java.com/bugdatabase/view_bug?bug_id=6754672
Also be careful with
-Dcom.sun.management.jmxremote.authenticate=falsewhichmakes access available for anyone, but if you only use it to track the JVM on
your local machine it doesn’t matter.
Update:
In some cases I was not able to reach the server. This was then fixed if I set this parameter as well:
-Djava.rmi.server.hostname=127.0.0.1