JDK-6699785 : JMX monitoring doesn't show any values IF jconsole as per JDK6 AND standalone instance through NA
  • Type: Bug
  • Component: tools
  • Sub-Component: jconsole
  • Affected Version: 6u4
  • Priority: P3
  • Status: Closed
  • Resolution: Not an Issue
  • OS: solaris_10
  • CPU: sparc
  • Submitted: 2008-05-09
  • Updated: 2010-07-29
  • Resolved: 2008-06-05
Related Reports
Relates :  
We are facing a JMX monitoring issue with AS9.1_0x, where 'jconsole'as per a JDK6 doesn't show any attribute values, instead all attribute values are shown as "Unavailable". (see attached jconsole.png)

The issue has been isolated further. It depends on 'jconsole' as per a JDK6(tried u1 and u4). The problem does not depend on a specific setup, eg. virtual servers or so nor on a specific EAR deployed. In addition, the issue appears to happen with an instance managed through a NA only, eg. a default server instance is fine.

Note: a 'jconsole' as per a JDK5 or VisualVM does display all attribute values properly!

EVALUATION This use case has put in evidence a known bug in JConsole 6 that was not present in JConsole 5 and that has been already fixed in VisualVM. However it looks like the root cause of the problem might well be a bug and/or misconfiguration issue in GlassFish. First of all I got a ClassNotFoundException when trying to get the attributes of MBean: "com.sun.appserv:name=http-listener-1,virtual-server=server,type=http-listener,category=monitor,server=instance1" java.rmi.UnmarshalException: Error unmarshaling return; nested exception is: java.lang.ClassNotFoundException: com.sun.enterprise.admin.common.exception.AFRuntimeException (no security manager: RMI class loader disabled) because /opt/SUNWappserver/lib/appserv-rt.jar was not part of JConsole's classpath. See exception1.log in attachment for more detailed info. After adding that jar to JConsole's classpath and adding some logging to JConsole's source code I could see the real exception: java -cp <jdk-home>/lib/tools.jar:<jdk-home>/lib/jconsole.jar:/opt/SUNWappserver/lib/appserv-rt.jar sun.tools.jconsole.JConsole javax.management.RuntimeMBeanException: com.sun.enterprise.admin.common.exception.AFRuntimeException: Server Configuration Bad. Caused by: com.sun.enterprise.admin.common.exception.AFRuntimeException: Server Configuration Bad. Caused by: javax.management.InstanceNotFoundException: com.sun.appserv:type=server-instance,name=instance1 The MBean "com.sun.appserv:type=server-instance,name=instance1" is not registered in the MBeanServer. See exception2.log in attachment for more detailed info.

WORK AROUND use jconsole as per a JDK5 or use VisualVM (https://visualvm.dev.java.net/)