tomcat jmx 穿墙配置 - 点滴记忆*记忆点滴
收藏本站

tomcat jmx 穿墙配置

默认情况下tomcat的jmx 访问需要两个端口,但因其中一个说动态的,有防火墙情况就难以配置。

tomcat 官方提供一个监听器,用于设置jmx 端口。方法如下:

1. 下载扩展包,到tomcat lib 下,下载地址在官网下载页Extras: JMX Remote jar

2. 在server.xml 中增加监听器配置。

 <Listener className="org.apache.catalina.mbeans.JmxRemoteLifecycleListener"
          rmiRegistryPortPlatform="10001" rmiServerPortPlatform="10002" />


3. 配置jmx 参数

-Dcom.sun.management.jmxremote.password.file=$CATALINA_BASE/conf/jmxremote.password
  -Dcom.sun.management.jmxremote.access.file=$CATALINA_BASE/conf/jmxremote.access
  -Dcom.sun.management.jmxremote.ssl=false
注意,不要端口参数

jmx 配置参考 http://www.tmser.com/post-45.html

    留下足迹