Skip to content

Instantly share code, notes, and snippets.

@gquere
Last active October 17, 2022 09:38
Show Gist options
  • Save gquere/6e4f26130bd3e2a09b5bbaeabc6e92c1 to your computer and use it in GitHub Desktop.
Save gquere/6e4f26130bd3e2a09b5bbaeabc6e92c1 to your computer and use it in GitHub Desktop.
jconsole certificate error

If jconsole doesn't trust the remote server's CA then on Linux it will fail with

Connection failed: error during JRMP connection establishment; nest exception is: java.io.EOFException

On Windows I got this error instead (?):

Connection failed: non-JRMP server at remote endpoint

This is solved by downloading the server's certificate and converting it to a keystore:

true | openssl s_client -connect server.com | openssl x509 > serv.cert
keytool -import -alias serv -keystore serv.jks -file serv.cert

Then jconsole can import it at launch:

jconsole -J-Djavax.net.ssl.trustStore=test.jks -J-Djavax.net.ssl.trustStorePassword='password'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment