Assumptions:
- tomcat6 installed on an ubuntu server instance
- firewall on the server instance is enabled
- server has non public ip address: 10.0.0.1
- client machine installed with java6 which includes visualvm
1) download catalina-jmx-remote.jar and copy it into the tomcat6 lib folder. At the time of this writing, I found it here: http://apache.opensourceresources.org/tomcat/tomcat-6/v6.0.33/bin/extras/
2) modify /etc/defaults/tomcat6, add the following line to JAVA_OPTS
-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=10.0.0.1
3) modify /etc/tomcat6/server.xml, add the following line inside the server block near the other listeners:
<Listener className="org.apache.catalina.mbeans.JmxRemoteLifecycleListener" rmiRegistryPortPlatform="8086" rmiServerPortPlatform="8086" />
4) enable access to port 8086
ufw allow 8086
5) restart tomcat6
service tomcat6 restart
6) start visualvm on the client machine and add a jmx connection: 10.0.0.1:8086
I hope you found the post useful. You can subscribe via email or subscribe via a feed reader to get relevant updates from this blog. Have a nice day.
No comments:
Post a Comment