我一直在试图通过JConsole监控本地运行的Tomcat。当然,我在catalina.bat中将
-Dcom.sun.management.jmxremote
添加到CATALINA_OPTS变量中,但启动JConsole时,我无法在进程列表中找到该进程。通过JConsole在本地设置监控Tomcat
经过一番搜索,我尝试了(更复杂?)非本地设置,在JConsole中进一步增加
set CATALINA_OPTS=-Dcom.sun.management.jmxremote \
-Dcom.sun.management.jmxremote.port=%my.jmx.port% \
-Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.authenticate=false
,并使用正确的参数,我可以通过远程接口进行连接。
是否有其他人试过并成功地在纯本地设置中使用JConsole/Tomcat,或者是伪远程方式获得本地tomcat监控的唯一机会?