Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to have a single JMX proxy for multiple JVMs?

Tags:

java

jmx

snmp

When running multiple JVMs on a single machine (single IP address as well), incorporating JMX in each JVM requires a separate port. For reasons I won't get into configured ports are at a premium in this environment, so instead I'd like to have a single JMX proxy on each machine that is capable of providing access to each of the local JVMs and their JMX data. This would be similar to a local SNMP daemon with agents running in each separate process.

Ephemeral ports are fine, however, since they're outside the contested range of ports I have access to for configuring JMX explicitly.

I know that products like Oracle Coherence do this internally, but are there any general solutions for doing this?

like image 810
Scott A Avatar asked Jul 26 '11 14:07

Scott A


1 Answers

The OpenDMK supports MBeanServer Cascading which is logically what you want to achieve, which is exposing multiple MBeanServers under the facade of one MBeanServer. The problem is that there is not "port free" form of inter-JVM JMX remoting, even for JVMs on the same host, so each JVM will still need to bind to at least 1 port, even if it is only accessed on localhost.. (Using JMXMP is your best bet for minimizing port usage since it is a single socket solution rather than RMI which is ..... non-deterministic). If you can live with this, then the Cascading actually works quite nicely and the protocol is implemented in the standard contemporary JMX remoting spec.

The only other way I can think of to allow for many more JVM/JMX Servers than actual ports on a host would be to develop a "TCP-less" JMX Connector Service Provider or multicast.

like image 84
Nicholas Avatar answered Sep 20 '22 23:09

Nicholas