I run Tomcat7 using JDK7 on Centos6. I enable JMX using the following options:
CATALINA_OPTS=\"${CATALINA_OPTS} -Dcom.sun.management.jmxremote -Dcom.sun.mana
You can use Tomcat's JMX Remote Lifecycle Listener which allows fixing the ports used by the JMX/RMI Server.
The JMX Remote Lifecycle Listener allows configuring the following ports:
rmiRegistryPortPlatform
- The port to be used by the JMX/RMI registry
for the Platform MBeans. This one should be used instead of the com.sun.management.jmxremote.port
system property rmiServerPortPlatform
- The port to be used
by the Platform JMX/RMI server.In addtions you can configure the useLocalPorts
attribute - Should any clients using these ports be forced to use local ports to connect to the the JMX/RMI server.
Notice that this listener requires catalina-jmx-remote.jar
to be placed in $CATALINA_HOME/lib
. This jar may be found in the extras directory of the binary download area.