How to have JMX bind to a specific interface?

后端 未结 5 1601
南笙
南笙 2021-02-05 05:56

I am currently starting my Java VM with the com.sun.management.jmxremote.* properties so that I can connect to it via JConsole for management and m

5条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-05 06:44

    The accepted answer is pretty old. There are some indications that Java now provides some options to enable this. For instance I have seen:

    -Djava.rmi.server.hostname=
    

    ...as well as...

    -Dcom.sun.management.jmxremote.host=
    

    However, at least on my system under jdk 1.7, these do not seem to have any effect - the JMX connector still binds to *. An updated answer (with specific applicable versions) would be much appreciated. This should be simple.

提交回复
热议问题