Skip to main content

GF 3.1.2 : Remote JMX

4 replies [Last post]
paulcb
Offline
Joined: 2008-02-06
Points: 0

Hi,

I am trying to monitor the heap memory and a few other items on the instances in a Glassfish 3.1.2 domain containing a few clusters and a few server instances in each cluster. I have a username and password set up for domain management and secure admin has been enabled.

When I try and use a JMX tool (like jconsole or jvisualvm) and connect to the DAS, then its fine and I can monitor the DAS's VM. I cannot however do the same for the other server instances. I try and connect to the JMX port using the admin username and password and jconsole fails to connect (no real error, it just says connection failed).

Enabling open (non-authenticated) access to JMX is not an option due to the security risks. What can I do to enable remote JMX access to JVM's in the domain?

Thanks so much
Paul

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
dj_canard
Offline
Joined: 2010-08-05
Points: 0

Hi Paul,

I experience likewise behaviour here with local instances, so no clusters here.
I can connect to the DAS using VisualVM but not to the instances (enable-secure-admin enabled ofcourse).
I do get a login popup-box but after entering login/pass the same popup reappears.

I'm still trying to get it to work.

Bas

paulcb
Offline
Joined: 2008-02-06
Points: 0

Hi Bas,

Yea, DAS is fine but any other server in the domain has an issue. Someone in the GF team is certainly doing changes on JMX but unfortunately does not seem to be following this mailing list. Wonder what other options exist to get this working. Let me know if you find anything.

Paul

dj_canard
Offline
Joined: 2010-08-05
Points: 0

Hi,

I investigated this issue further and also found this issue: http://java.net/jira/browse/GLASSFISH-18450.
So it is fixed, but only for GF 4.0 unfortunately. It is not clear if this fix will be included in a future 3.1 release.

Nevertheless, I managed to get remote JMX working by using the well-known "com.sun.management.jmxremote" JVM-arguments. So in this way you are plugging in the JVM directly and avoiding the GlassFish JMX-connector: http://javadude.wordpress.com/2011/11/18/remote-glassfish-v3-1-and-the-m...

But with this solution I ran into firewall issues because the JMX-connection (RMI) uses dynamic ports. What you can do about this is to write your own JMX-listener using a static port. It isn't too hard and explained here: http://blogs.law.harvard.edu/hoanga/2006/07/07/getting-java-jmx-to-work-...

Good luck!

tjquinn
Offline
Joined: 2005-03-30
Points: 0

Note that this problem has also been fixed in GlassFish 3.1.2.2.

- Tim