Opening Up Glassfish to remote JMX monitoring

We are doing monitoring of our apps using ManageEngine Applications Manager. It supports JMX remoting. The latest patch release supports composite types. Very nice.
Right now Glassfish is the new kid on the block. Support for it is not yet baked in to Applications Manager (but will be, according to their product manager). In the meantime you can use generic JMX monitoring to monitor it.
The glassfish domain defaults do not work for remote monitoring. After a bit of playing around I got it to work.
You need to add the following to your domain.xml configuration in Glassfish:
Add these to the java-config element:
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
Add this to the admin-service element.
<jmx-connector accept-all=”true” address=”0.0.0.0″ auth-realm-name=”admin-realm” enabled=”true” name=”system” port=”8687″ protocol=”rmi_jrmp” security-enabled=”false”/>
Not sure exactly which change fixed it. But this config works.
In Applications Manager you do the following(example only):
Host Name / IP Address: developer249
Port: 8687
Polling Interval: 1
JNDI Name: /jmxrmi
Authentication is enabled: X
User Name: admin
Password: password
The same thing works for the jconsole and should work for NMS’s that support JMX. Enjoy.

Published
Categorized as Java

By Greg Luck

As Terracotta’s CTO, Greg (@gregrluck) is entrusted with understanding market and technology forces and the business drivers that impact Terracotta’s product innovation and customer success. He helps shape company and technology strategy and designs many of the features in Terracotta’s products. Greg came to Terracotta on the acquisition of the popular caching project Ehcache which he founded in 2003. Prior to joining Terracotta, Greg served as Chief Architect at Australian online travel giant Wotif.com. He also served as a lead consultant for ThoughtWorks on accounts in the United States and Australia, was CIO at Virgin Blue, Tempo Services, Stamford Hotels and Resorts and Australian Resorts and spent seven years as a Chartered Accountant in KPMG’s small business and insolvency divisions. He is a regular speaker at conferences and contributor of articles to the technical press.