Tuesday, October 17, 2017

How to enable JMX console on Apache Tomcat 7.x.x

First Stop tomcat service if it is running. Navigate to tomcat home directory.

 #cd /opt/tomcat/bin
 #./shutdown.sh
Now create setenv.sh file at /opt/tomcat/bin and put below entry in file (setenv.sh).

#vim setenv.sh

CATALINA_OPTS="-Dcom.sun.management.jmxremote.port=8090 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=192.168.1.150"







Note :- Here this will allow JMX to connect on 8090 port number, without authentication. An server hostname or ip address is 192.168.1.150
Now start tomcat service by running below command.
#cd /opt/tomcat/bin
#chmod 775 setenv.sh
#sh startup.sh





It should be run without any errors like shown above, check port number is in listening state or not.





Now connect from server from JAVA monitoring console to verify.























Click on connect, it will prompt for insecure connection, click on Insecure connection.










Now You will see device details on console after successfully connection established.

























No comments:

Post a Comment