Red Hat Bugzilla – Bug 590175
Feature request: Enhance plugin 'JMX' to discover local-access MBeanServers
Last modified: 2010-05-10 14:50:37 EDT
Description of the feature requested:
Enhance the 'JMX' plugin to be able to discover MBeanServers that are not remote-accessible. I'd like to use JOPR to monitor many standalone JVMs whose MBeanServers are configured to only be accessible locally.
This will eliminate the need to secure each of those MBeanServers and will have the side benefit that teams won't have MBeanServer remote port # collisions.
In order for this to work we'll have to run the Agent as the same userid as the processes to be monitored.
The existing 'JMX' plugin discovers MBeanServers running on the same machine as the agent by looking at the process list for the following argument:
This works when the JVM to be monitored exposes its MBeanServer on a remote access port (as described here: http://java.sun.com/j2se/1.5.0/docs/guide/management/agent.html#remote).
JVMs that are not configured to expose their MBeanServer(s) on a remote port may still be accessed from that local machine by a process that is run as the same userid. This can be demonstrated using JConsole. The method of discovery required is slightly different in that you can't just look for the port number argument described above.
Version-Release number of selected component (if applicable):
I have a rough version of an extension to the JMX plugin that demonstrates this functionality. I'll attach that sometime in the next couple of days.
Oops - I just discovered that the JMX plugin developers have already been down this road. I just encountered the same drawback that is described in the disabled section of code cited below.
// This model of discovery is of questionable usefulness since if you restart your process you'll get a new resource
// Works only on JDK6 and maybe some 64 bit JDK5 See JBNADM-3332.
Link to source:
Closing ticket. Unless we can come up with a way to deal with the fact that the JMX URL is different after a process restarts this is of limited usefulness. We don't want to have to re-discover and re-import a process each time that it is restarted.