Java – How to set the jmx to listen in a specific IP

javajbossjmx

I am trying to configure jboss to allow monitoring with a jmx tool (I am looking at a few so no need to give).

Looking at the properties in java jmx docs it does not seem to have a property to set the host, so if I run more than one jboss in the same machine then I have to define the different ports in each of the startups scripts (which is a maintenance nightmare)

com.sun.management.jmxremote
com.sun.management.jmxremote.port
com.sun.management.jmxremote.registry.ssl
com.sun.management.jmxremote.ssl
com.sun.management.jmxremote.ssl.enabled.protocols
com.sun.management.jmxremote.ssl.enabled.cipher.suites
com.sun.management.jmxremote.ssl.need.client.auth
com.sun.management.jmxremote.authenticate
com.sun.management.jmxremote.password.file
com.sun.management.jmxremote.access.file
com.sun.management.jmxremote.login.config

Does anyone know how can I setup the host in the jmx?

Best Answer

Apparently you cannot(unless you start modifying things in your container).

https://stackoverflow.com/questions/331615/how-to-have-jmx-bind-to-a-specific-interface