使用Jconsole(建议使用跟java应用一样的jdk)监控java应用时,可能出现连接不上或者一直在等待的问题,如下图:

个人小结---本地使用JConsole连接失败的处理

这时需要配置一下。

本地应用使用如Eclipse启动。增加如下的配置:

-Dcom.sun.management.jmxremote 
-Dcom.sun.management.jmxremote.port=8011
-Dcom.sun.management.jmxremote.ssl=false  
-Dcom.sun.management.jmxremote.authenticate=false

个人小结---本地使用JConsole连接失败的处理

如果-Dcom.sun.management.jmxremote.port配置的端口已被占用,改为其他未被占用的端口就行。

重新启动应用,即可访问,访问的页面如下:

个人小结---本地使用JConsole连接失败的处理


相关文章:

  • 2022-12-23
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2021-12-27
  • 2022-12-23
  • 2021-12-23
猜你喜欢
  • 2021-09-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-17
  • 2022-01-11
相关资源
相似解决方案