You need to do following configuration to enable Remote JMX monitoring on tomcat server.
- Copy jmxremote.password.template located at JRE_HOME/lib/management inside the same folder with the name jmxremote.password.
- Edit this jmxremote.password file and uncomment last two lines starts with monitorRole and controleRole and instead of QED and R&D set some good password for both of them.
- Change directory to CATALINA_HOME/bin from where you start the tomcat.
- You will find setenv.sh (if you don't find it create one) and add following line inside file CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.
jmxremote.port=9000 -Djava.rmi.server.hostname= 127.0.0.1 -Dcom.sun.management. jmxremote.ssl=false" - Here in above line you need to set proper ip address which is accessible from remote machine to -Djava.rmi.server.hostname and set available port number to -Dcom.sun.management.
jmxremote.port - Once all this settings are done restart / start tomcat.
- Start jconsole $ jconsole
- Select Remote Process option and enter "<remote ip address>:<port>", specify username as monitorRole or controleRole and password that you set inside jmxremote.password file for corresponding user.
This should start remote monitoring of remote JVM tomcat.