Nishant Lakhara
Nishant Lakhara

Reputation: 2455

JMX parameters correctly passed but couldn't connect using jconsole

i have passed following jmx parameters in a java program and deployed it on some remote machine.

-Dcom.sun.management.jmxremote.port=5001 
-Dcom.sun.management.jmxremote.authenticate=false 
-Dcom.sun.management.jmxremote.ssl=false

Still when I am trying to connect to the host using host:port in jconsole, it redirects me to InsecureConnection and then it doesn't connect.

Upvotes: 0

Views: 237

Answers (1)

commit-man
commit-man

Reputation: 376

add

-Dcom.sun.management.jmxremote.host=<hostname>  
-Dcom.sun.management.jmxremote.rmi.port=<pornNum>

When you only specify -Dcom.sun.management.jmxremote.port it binds rmi registry to that port. This registry contains remote object, and you should add -Dcom.sun.management.jmxremote.rmi.port to specify where to bind that remote object. Otherwise random port will be used and it will be not good if you have firewall. You can see sun.management.jmxremote.ConnectorBootstrap#startRemoteConnectorServer for more details

Upvotes: 1

Related Questions