繁体   English   中英

使用Jconsole监视远程JVM

[英]Monitoing of remote JVM using Jconsole

我正在尝试使用Jconsole监视远程jvm。 jdk1.7.0_75已安装并在远程计算机上的jre / lib / management / management.properties文件中配置了以下参数。

-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=8002
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Djava.rmi.server.hostname=x.x.x.x

获取连接失败:连接被拒绝。 检查端口号8002是否可用并禁用防火墙,请提供解决方案。

您正在设置正确的属性,但是在这里混合了两种不同的方法。 要在您的应用程序上启用JMX,您需要:

  • 使用上面使用的这些命令行参数启动应用程序( java -Dcom.sun.management.jmxremote.port=8002 -cp somedependency.jar Appplication应用程序)

  • 将类似的条目添加到您的management.properties中,但不带“ -D”前缀。 像这样的条目: com.sun.management.jmxremote.port=8002

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM