-1

There are 2 servers running same java application.

Successful connection to server is running process with java version as below

java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)

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

Unsuccessful connection to server is running process with java version as below

java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

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

Network is open for ports which i confirmed with telnet.

jconsole on my desktop i used to test is of below version

JConsole version: 1.8.0_121-b13
Java VM version: Java HotSpot(TM) 64-Bit Server VM, 25.121-b13

Errors -

Secure Connection Failed. Retry insecurely ?

After retry another repetitive error as below

Connection Failed. Retry?
Ehteshaam
  • 141
  • 8
  • Please provide detailed information on what you mean by _"Unsuccessful connection"_. Include all error messages and stack traces. Show how you confirmed that the debug port is listening. Did you run `sudo netstat -natp` on both servers and confirm that the port is LISTENING and owned by the expected JVM process? – Jim Garrison Jun 27 '18 at 05:17
  • Thanks @JimGarrison. I did telnet to confirm that port is open. I am not sure how to enable debug for jconsole in windows. – Ehteshaam Jun 27 '18 at 09:26

1 Answers1

0

One highly probable reason is your dns is not properly configured in /etc/hosts file.

Java bug 6209663 was also reported after which below article was updated to include its case.

Please see this oracle's FAQ#5.

For quick reference I'd quote a part of this below:

Run "hostname -i" command. If it reports 127.0.0.1, JConsole would not be able to connect to the JVM running on that Linux machine. To fix this issue, edit /etc/hosts so that the hostname resolves to the host address.

M. Justin
  • 14,487
  • 7
  • 91
  • 130
Shanu Gupta
  • 3,699
  • 2
  • 19
  • 29