Last active
April 9, 2020 21:42
-
-
Save swaldman/5529452 to your computer and use it in GitHub Desktop.
Some hints on debugging remote jconsole Connection problems
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Expressed as ant xml, but these are system properties that should be set on the JVM to be instrumented: | |
<sysproperty key="com.sun.management.jmxremote" value="true"/> | |
<sysproperty key="com.sun.management.jmxremote.port" value="38383" /> | |
<sysproperty key="com.sun.management.jmxremote.authenticate" value="false" /> | |
<sysproperty key="com.sun.management.jmxremote.ssl" value="false" /> | |
<sysproperty key="java.rmi.server.hostname" value="10.10.10.10" /><!-- ip address of the JVM you wanna connect to --> | |
To see debugging information when running jconsole client: | |
jconsole -debug hostname.mchange.com:38383 | |
...or, for lots more... | |
jconsole -debug -J-Djava.util.logging.config.file=/Users/swaldman/tmp/logging.properties hostname.mchange.com:38383 | |
FIREWALL ISSUES! | |
jconsole is an RMI-based service that does not play nicely with firewalls. If you need to access JVMs from outside, you'll need to punch holes not just in the jmxremote port, but over the full range over which an "anonymous" port may be allocated! e.g. at the moment I succeed having (temporarily) opened 35000 to 65000. Not a great thing! | |
Some references: | |
https://blogs.oracle.com/jmxetc/entry/troubleshooting_connection_problems_in_jconsole | |
http://docs.oracle.com/javase/1.5.0/docs/guide/management/faq.html | |
http://www.netcluesoft.com/rmi-through-a-firewall.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment