2013年3月11日 星期一

Tomcat7 & JConsole & JMX

不知道是不是因為Timcat7的關係, 網路上找到的設定都沒辦法成功
最後總結成功的設定(基本上參考http://www.haogongju.net/art/1762695)

1. download ​​catalina-jmx-remote.jar from http://tomcat.apache.org/download-70.cgi(address may change)
and save to $CATALINA_HOME/lib

2. Add Listener to server.xml, in my case


3. set JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=[Host IP]

3.1 If use CATALINA_OPTS will cause Exception (java.io.FileNotFoundException: jmxremote.access) in my case.
3.2 -Djava.rmi.server.hostname=[Host IP] is essential if want to connect remotely.

4. Start Tomcat

5. Run jconsole Remote Process with :9081

It works!!



沒有留言:

張貼留言