Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable jconsole popup: "Secure connection failed. Retry insecurely?"

Tags:

java

jconsole

Is there a way to disable this jconsole popup?

jconsole "Secure connection failed. Retry insecurely?"

I know I can set up SSL per http://docs.oracle.com/javase/7/docs/technotes/guides/management/agent.html#gdemv, but that would mean I'd need to do that on all servers (java) and all clients (jconsole). Not the most friendly solution for non-critical in-house apps. Any other solutions?

like image 514
levant pied Avatar asked Aug 04 '15 16:08

levant pied


2 Answers

It's not possible. Jconsole always tries first to connect using SSL and it's impossible to alter this behavior. From jconsole sources it's determined by

 private boolean shouldUseSSL = true;

which can be set to false only after it fails to connect using SSL. Suggestions: use other JMX client tool (say jvisualvm or jmc) or enable SSL.

like image 75
alsid Avatar answered Nov 06 '22 15:11

alsid


Not using SSL is possible! Use jconsole -debug -J"-Djava.util.logging.config.file=FILENAME" to see the logged exception. Probably you also need to configure the parameter -Djava.rmi.server.hostname=server.example

like image 37
Leo Avatar answered Nov 06 '22 15:11

Leo