- Restart the app with the following JVM arguments:
-Dcom.sun.management.jmxremote.port=9010
-Dcom.sun.management.jmxremote.rmi.port=9010
-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.local.only=false
-
Expose port 9010 for that docker container.
-
Bring up an SSH tunnel to the host, which runs that docker container, to forward all communications through port 9010:
ssh vpn -L 9010:localhost:9010
- Start jvisualvm and add new "JMX connection" to
"localhost:9010"
- "Profile" tab will not be available, because of JMX. But, "Sampling" tab is useful.