3

I am new to linux and just deployed a java program to run on a linux server. I tried to connect from my windows machine to the linux box with jconsole and got an error.

Connection Failed: non-JRMP server at remote endpoint

I searched online and found the following suggestion was to run the following:

java -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=
[YOUR PORT] -Dcom.sun.management.jmxremote.ssl=
false -Dcom.sun.management.jmxremote.authenticate=false -jar [YOUR JAR NAME]

I entered the following into a batch file and executed it. I then tried to connect using jconsole using the follow command

service:jmx:rmi:///jndi/rmi://ipaddress:port/jmxrmi

as suggested but still cannot (Connection failed: retry)/

vbNewbie
  • 3,291
  • 15
  • 71
  • 155

4 Answers4

2

I got the same issue but the reason was different, I was hitting http port instead of JMX port. The error message appeared same as in your case but later I figured out it was port issue. Since JMX process runs on different port so be careful while opening JConsole on remote server.

Sachchidanand Singh
  • 1,456
  • 1
  • 15
  • 15
1

Resolved situation by setting hostname to ipaddress when calling process on linux

vbNewbie
  • 3,291
  • 15
  • 71
  • 155
1

I faced this problem at localhost.

  1. Wrong port was used.
  2. So, I changed my JMX port to be different from application port in my run configuration and yet, the port changes did not take effect until the application container was restarted.

Fixing above resolved my issue.

Harish
  • 638
  • 1
  • 10
  • 20
0

Another possible reason for error message Connection failed: non-JRMPserver at remote endpoint: the RootCA-certificate of the server hasn't been added into the client's cacerts file.

Lorinczy Zsigmond
  • 1,749
  • 1
  • 14
  • 21