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
But when you open your jconsole on your local computer to connect to the remote server…
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 184.108.40.206 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=220.127.116.11 #ip of the remote machine, yes the ip, not the name
VoilàTip $1 Tip $2 Tip $5