Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ascheman/4ff6a3c1d2d9274e8ae30e13356707bb to your computer and use it in GitHub Desktop.
Save ascheman/4ff6a3c1d2d9274e8ae30e13356707bb to your computer and use it in GitHub Desktop.
The first answer helped me to connect to a JVM running in Kubernetes via a port forwarding:
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=10099
-Dcom.sun.management.jmxremote.rmi.port=10099
-Djava.rmi.server.hostname=127.0.0.1
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
I.e. setting the hostname to 127.0.0.1 and setting both jmx and rmi port to the same value!
Then I could connect in jvisualvm via Local->Connect to JMX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment