jconsole: “Connection Failed: Retry?” #SOLVED #java #jmx
So you wrote a piece of server software and you found out about JMX and the jconsole tool to remotely monitor all sorts of interesting metrics remotely, all without adding a single line of code to your project.
Say you want to run it the simplest way possible with no authentication, the tutorial says that these are the options you need to pass to the remote virtual machine to enable JMX remote monitoring on some port (let’s put 9595 for illustrative purposes).
-Dcom.sun.management.jmxremote.port=9595', -Dcom.sun.management.jmxremote.ssl=false', -Dcom.sun.management.jmxremote.authenticate=false
right?
But when you open your jconsole on your local computer to connect to the remote server…
jconsole myserver.com:9696
You get this fucking error no matter what you do.

You’re just missing one more option they must have forgotten to mention in the retard tutorial at oracle.com
(let’s use IP address 72.14.204.147 as the remote server IP)
-Dcom.sun.management.jmxremote.port=9595', -Dcom.sun.management.jmxremote.ssl=false', -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=72.14.204.147 #ip of the remote machine, yes the ip, not the name
VoilĂ
Did this help you? Tip $1 Tip $2 Tip $5
December 18th, 2010 at 2:17 pm
Thanks for the very clear explanation. Really helpful. I couldn’t figure it out why the remote connection worked from the same host but failed when using jconsole from any other host (defeats the point of using remote connexion really). Oracle’s tutorial needs to be update because it’s misleading.
I also wonder why the rmi server can’t automatically pick up a local ip…?
December 31st, 2010 at 12:58 pm
hey oie disculpa pero tu hiciste un video de frostwire encontre esta pagina
queria saver donde conseguiste el tema que estas usando en ubuntu
supongo que es de gnomenu pero me gustaria saver el nombre del tema
espero tu respuesta
December 31st, 2010 at 12:59 pm
How To Install FrostWire on Ubuntu Netbook Remix (youtube)
ese es el nombre del video sino lo hiciste tu disculpa por molestarte
February 14th, 2011 at 2:26 pm
wow, ese video era muy viejo, la verdad que no recuerdo si el tema que tenia venia por defecto con ese ubuntu (dado que el video mostraba como instalar ubuntu, asi que no creo que habria dado chance de ponerle tema)
July 23rd, 2011 at 10:11 am
Many thanks!!
August 31st, 2011 at 6:46 am
Great piece of advice, worked for me!
November 4th, 2011 at 7:41 am
thanks it’s working
November 8th, 2011 at 1:48 am
Thanks a lot it help me.
November 17th, 2011 at 7:59 pm
That rescued the day for me. All the tutorials and docs did lsay the server name is an optional. I can jconsole my remote app now.
January 20th, 2012 at 3:12 pm
Thanks a lot!
August 13th, 2012 at 6:00 am
Thanks a lot !!
September 20th, 2012 at 6:56 am
And helped me too today! Thanks!
October 16th, 2012 at 9:56 pm
Superb, This solution worked for me .Thanks a lot
January 15th, 2013 at 6:39 pm
Thanks. Oracle should put that in their tutorial.