JConsole 监听 Tomcat 配置

JConsole 连接 Tomcat 需要配置如下:

无需用户名密码

-Dcom.sun.management.jmxremote.port=11311 (监听端口)

-Dcom.sun.management.jmxremote.authenticate=false (无需验证)

-Dcom.sun.management.jmxremote.ssl=false (拒绝SSL连接)

Djava.rmi.server.hostname=127.0.0.1 (本机连接地址, 当本机有多个网卡或虚拟网卡时,一定要指定其IP)

在 Tomcat 的 bin 目录下,修改 catalina.sh 文件,加入如下信息:

JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=11311 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=127.0.0.1"

猜你喜欢

转载自fantasyeye.iteye.com/blog/1881612