Trying to connect jconsole to a remote server.
I added this to my catalina.sh:
export JAVA_OPTS="-Dcom.sun.management.jmxremote \
-Dcom.sun.management.jmxremote.port=9005 \
-Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.authenticate=false \
-Djava.rmi.server.hostname=xx.xx.xx.xx"
catalina.out shows:
Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: myhostname: myhostname
Not sure why it repeats my hostname in the error message?
BTW, since I set authentication to false, in the jconsole app, do I leave username/password blank or is that for logging into the server?
You have to add the same host name in /etc/hosts
file as you have defined in /etc/sysconfig/network
file.
This is how I solved my problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With