service:jmx:rmi:///jndi/rmi://ip:9889/jmxrmi
http://stackoverflow.com/questions/2768087/explain-jmx-url
According to javax.management.remote.rmi
this url is assembled like this
service:jmx:rmi://ignoredhost/jndi/rmi://myhost/myname
67down voteaccepted |
I will reuse an answer I wrote up earlier for this question: Cannot connect to Tomcat's MBeanServer via jconsole in Java6 It's not complete, but might help: Suppose you have the JMX Server (alias 'JMX Agent' alias 'the JVM you want to connect to') running on 'TARGET MACHINE' with the RMI registry port at 'RMI REGISTRY PORT' and the JMX RMI server port at 'JMX RMI SERVER PORT'. Note:
The following URI will lead to successful connection (tested)
This looks nasty. Let's cut it apart. This URI is an RFC2609 "Service Location Protocol URL" (well, it's really an URI, right?) It is composed of:
sap is decomposed into:
A well-informed JMX client connects to the "ipsite" to do JMX-over-RMI exchanges; but what of the JMX client that doesn't KNOW that port? Patience... URL part is decomposed into:
This is somewhat cart-before-horse, as one has to contact the RMI registry given by the latter part of the SLP URL first. After scratching head, intuitively, let's try:
Yes, that works! The JMX RMI server port is nicely obtained from the registry. On second thoughts, the target machine should also be obtained from the registry, thus:
Even better, that works, too! References:
|