Connect from local to remote host JMX via SSH port forwarding

Add settings to tomcat

Add the following settings to catalina.sh.

CATALINA_OPTS="$CATALINA_OPTS  -Dcom.sun.management.jmxremote=true 
-Dcom.sun.management.jmxremote.port=8180 
-Dcom.sun.management.jmxremote.rmi.port=8181 
-Dcom.sun.management.jmxremote.ssl=false 
-Dcom.sun.management.jmxremote.authenticate=false 
-Djava.rmi.server.hostname=localhost"

SSH port forwarding settings

For Teraterm, set as follows. First: Local port: 8180 Remote host: Host to refer to JMX Port: 8180 Second: Local port: 8181 Remote host: Host to reference JMX Port: 8181

image.png

image.png

Connect from jconsole to JMX

Start jconsole. Then select Remote Process, type localhost: 8180, and click Connect. image.png

Recommended Posts

Connect from local to remote host JMX via SSH port forwarding
Ssh connect from container to git with VSCode Remote Container
Connect with port forwarding with SSH and send and receive files
Connect to AWS RDS from your local PC Docker environment
Connect from Java to PostgreSQL
[Docker] Does not connect to MySQL workbench ... DB container port forwarding settings