title: Can't connect jconsole to remote server, tomcat failing to start
body: <p>Trying to connect jconsole to a remote server.</p>
  
  <p>I added this to my catalina.sh:</p>
  
  <pre><code>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"
  </code></pre>
  
  <p>catalina.out shows:</p>
  
  <pre><code>Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: myhostname: myhostname
  </code></pre>
  
  <p><strong>Not sure why it repeats my hostname in the error message?</strong></p>
  
  <p>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?</p>