0

I would like to monitor a remotely running java (spring boot) application with jvisualvm (or jconsole). When running locally, I can see the managed beans in both jvisualvm and jconsole. When running remotely I cannot connect. I tried it with several different java processes (e.g. with spring xd). Looking for answers here on SO and on Google did not help.

These are my JAVA_OPTS (on the remote host):

$ echo $JAVA_OPTS
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=10.106.138.210

The java version on the remote host (centos linux vm) is:

$ java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

The java version on the local machine (Mac OS) is slightly different:

java in windows machine

$ java -version    
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b25)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
In jvisualvm I add the remote connection as follows (tried both with ssl connection and without):

When i connect remote java application through JVISUALVM as like, 10.106.138.210:9010

I got error like,

Cannot connect to 10.106.138.210:9010 service:jmx:rmi:///jndi/rmi://10.106.138.210:9010/jmxrmi

Please help me

Saravana
  • 12,647
  • 2
  • 39
  • 57
Vinoth
  • 7
  • 2
  • 10

1 Answers1

0

Most likely you can't connect due to a networking problem, for example the IP address you're using is incorrect, a firewall is preventing connectivity, or the java process you're connecting to isn't actually listening on port 9010. This command should succeed remotely to indicate connectivity with TCP/IP:

telnet 10.106.138.210 9010

Reference:

https://visualvm.java.net/jmx_connections.html

ck1
  • 5,243
  • 1
  • 21
  • 25