服务端配置(无密码)
-Dcom.sun.management.jmxremote= true
-Dcom.sun.management.jmxremote.port= 8004
-Dcom.sun.management.jmxremote.ssl= false
-Dcom.sun.management.jmxremote.authenticate= false
-Dcom.sun.management.jmxremote.port= 8004
-Dcom.sun.management.jmxremote.ssl= false
-Dcom.sun.management.jmxremote.authenticate= false
服务端hostname配置(这步很重要)
hostname -i #该命令应该显示当前服务器的外网IP(修改/etc/hosts文件),否则客户端无法连接服务端。
*** 如果hostname绑定了本地IP,可以通过参数“-Djava.rmi.server.hostname=<ip>”来指定IP启动JMX服务。
客户端使用
打开jconsole,远程进程中敲入:<Server_IP>:8004
参考:
#这个写的很全面
http://jiajun.iteye.com/blog/810150
# Jconsole 不能连接远程服务的问题
http://www.hellophp.cn/archives/162
--heipark