简体   繁体   中英

Monitoing of remote JVM using Jconsole

I'm trying to monitor remote jvm using Jconsole. jdk1.7.0_75 is installed and configured the below parameter in jre/lib/management/management.properties file on remote machine.

-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=8002
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Djava.rmi.server.hostname=x.x.x.x

Getting Connection failed: connection refused. checked the port number 8002 is free and disabled the firewall, Kindly provide the solution.

You are setting the right properties, but mixing two different approaches here. To enable JMX on your application you either need to:

  • start your application with these command line parameters you used above ( java -Dcom.sun.management.jmxremote.port=8002 -cp somedependency.jar Appplication )

  • add similar entries to your management.properties BUT WITHOUT the "-D" prefixes. So entries like: com.sun.management.jmxremote.port=8002

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM