How To Enable Remote Jvm Monitoring Using Jre's Built Inwards Jconsole

This involve volition help yous setup a remote jvm monitoring tool using jconsole.

The setup:
1.) Ubuntu 12.04
2.) Glassfish 3.1.2.2
3.) jdk1.6.0_32

Steps:
1.) In your glassfish's default domain1 domain.xml file, /glassfish_home/glassfish/domains/domain1/config/domain.xml, add together the next lines inward the jvm section:
<jvm-options>-Djava.net.preferIPv4Stack=true</jvm-options> <jvm-options>-Dcom.sun.aas.jconsole.server.cbport=18687</jvm-options> <jvm-options>-Dcom.sun.management.jmxremote.ssl=false</jvm-options> <jvm-options>-Dcom.sun.management.jmxremote.authenticate=false</jvm-options> <jmx-connector address="0.0.0.0" auth-realm-name="admin-realm" name="system" port="18686" protocol="rmi_jrmp" security-enabled="false"/>  //you tin laid upwards the fully qualified domain get upwards if yous have, otherwise nosotros volition connect using ip <jvm-options>-Djava.rmi.server.hostname=mydomain.com
2.) Rename /usr/lib/jvm/jdk1.6.0_32/jre/lib/management/jmxremote.password.template->/usr/lib/jvm/jdk1.6.0_32/jre/lib/management/jmxremote.password

3.) Uncomment monitorRole in addition to controlRole users

4.) Change the possessor of /usr/lib/jvm/jdk1.6.0_32/jre/lib/management/jmxremote.password, the same every bit the possessor of glassfish folder:
sudo chown owner:group /usr/lib/jvm/jdk1.6.0_32/jre/lib/management/jmxremote.password sudo chmod 600 /usr/lib/jvm/jdk1.6.0_32/jre/lib/management/jmxremote.password 

5.) Restart glassfish in addition to connect from a remote auto using JConsole, operate inward the IP in addition to port 8686. Example: 192.168.0.106:8686
Next
Previous
Click here for Comments

0 komentar:

Please comment if there are any that need to be asked.