Tomcat7 with enabled JMX opens 2 additional random listening ports

前端 未结 1 1987
余生分开走
余生分开走 2021-01-20 11:02

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         


        
相关标签:
1条回答
  • 2021-01-20 11:29

    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.

    0 讨论(0)
提交回复
热议问题