开发者

Monitoring Tomcat via JConsole in a local setting

I've been trying to monitor a locally running Tomcat via JConsole. I, of course, added

-Dcom.sun.management.jmxremote to the CATALINA_OPTS variable in catalina.bat, but when starting JConsole, I couldn't find the process in the process list.

After some searching, I tried开发者_C百科 out the (more complicated?) non-local setting, further adding

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

and using the right parameters in JConsole, I was able to connect via the remote interface.

Has anyone else tried and succeded in using JConsole/Tomcat in a pure local setting or is the pseudo-remote way the only chance to get a local tomcat monitored?


I ran into the same thing--I'm used to running jconsole on my local Tomcat process that's been started with the -Dcom.sun.management.jmxremote flag, but it didn't work for me the first time I tried it on my laptop.

Another answer in here tipped me off to the temp directory being the key to getting this working. My Tomcat process has this argument:

-Djava.io.tmpdir="c:/install/apache-tomcat-6.0.18/temp"

I was able to get jconsole running with this command line:

jconsole -J-Djava.io.tmpdir="c:/install/apache-tomcat-6.0.18/temp"

I am running JDK 6 update 24 on a Windows 7 64-bit system.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜