Friday, May 26, 2017

Enabling Jmx for Tomcat

Create (or append to) the file /opt/mas/tomcat/bin/setenv.sh
#!/bin/sh
CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote.port=1701 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.local.only=false \
 -Dcom.sun.management.jmxremote.password.file=/opt/mas/jmx/tomcat.password -Dcom.sun.management.jmxremote.access.file=/opt/mas/jmx/jmx.access"
then run the following commands:
chown tomcat:tomcat /opt/mas/jmx/tomcat.password /opt/mas/tomcat/bin/setenv.sh
/etc/init.d/tomcat_8080 stop
/etc/init.d/tomcat_8080 start

No comments: