本文主要是介绍使用jconsole远程监控java程序,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
启动参数:
exec java -Djava.rmi.server.hostname=192.168.1.111 -Dcom.sun.management.jmxremote.port=18999 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Xmx128m -Xmx512m -jar ./OAM.jar 5
连接失败的原因:
#hostname -i
打印的不是本机的外网IP,修改/etc/hosts文件。
Error: Password file read access must be restricted: /root/jdk1.6.0_26/jre/lib/management/jmxremote.password
JRE_HOME/lib/management/jmxremote.password 和 JRE_HOME/lib/management/jmxremote.access文件。
jmxremote.password 远程访问的用户名和密码, jmxremote.access用户的访问权限,有readonly和readwrite选项。
jmxremote.password 可以有jmxremote.password.template生成,
修改文件权限chmod 0400 ./jmxremote.password。
这篇关于使用jconsole远程监控java程序的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!