Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Cannot connect to a local JVM with JMC - unexpected IP in error message

Silver QUETTIERMay 16 2018 — edited May 22 2018

Hello,

I'm struggling to connect to a local JVM with the JMX Console invoked by JMC.

The local app I want to monitor is launched by the following command:

java -Xms1024m -Xmx1024m -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=7091 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -cp %classpath% my.fully.qualified.ClassName

The JVM is discovered by JMC under local processes.

Connecting through the detected process results in the following:

Could not connect to [1.8.0_162] my.fully.qualified.ClassName (9100) : Connection refused to host: 192.168.56.1; nested exception is:

java.net.ConnectException: Connection timed out: connect

Could not connect to [1.8.0_162] my.fully.qualified.ClassName (9100). Make sure the JVM is running and that you are using the correct protocol in the Service URL (service:jmx:rmi://127.0.0.1/stub/rO0ABXNyAC5qYXZheC5tYW5hZ2VtZW50LnJlbW90ZS5ybWkuUk1JU2VydmVySW1wbF9TdHViAAAAAAAAAAICAAB4cgAaamF2YS5ybWkuc2VydmVyLlJlbW90ZVN0dWLp/tzJi+FlGgIAAHhyABxqYXZhLnJtaS5zZXJ2ZXIuUmVtb3RlT2JqZWN002G0kQxhMx4DAAB4cHc3AAtVbmljYXN0UmVmMgAADDE5Mi4xNjguNTYuMQAAz7k5I+/bmeEL9Opvhf8AAAFjaWMcfIACAHg=).

Connecting through a custom connection to localhost:7091 results in the following:

Could not connect to localhost : Connection refused to host: 192.168.56.1; nested exception is:

java.net.ConnectException: Connection timed out: connect

Could not connect to localhost. Make sure the JVM is running and that you are using the correct protocol in the Service URL (service:jmx:rmi:///jndi/rmi://localhost:7091/jmxrmi).

I have no idea what is going wrong, or from where the 192.168.56.1 host comes from.

Any ideas?

This post has been answered by Hirt-Oracle on May 16 2018
Jump to Answer

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 19 2018
Added on May 16 2018
2 comments
6,375 views