2

I am rather perplexed at this point as we have a need to connect through remotejxm to monitor the JDK on a server through a monitoring application but I am repeatedly being told when trying to connect that it is not running. We have checked the ports and the 8999 port is open but its not letting me connect through remotejxm but I am able to connect via telnet on that same port, I have the Java options set as follows (we are running Tomcat on Windows server 2003). Any advice on what else I could look into would be greatly appreciated

-Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 6.0
-Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 6.0
-javaagent:C:\Program Files\Apache Software Foundation\Tomcat 6.0\AppManager\WebTransactionAgent.jar
-Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 6.0\endorsed
-Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 6.0\temp
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\logging.properties
-verbose:gc
-XX:+PrintGCDetails
-XX:+PrintGCDateStamps
-XX:+PrintHeapAtGC
-XX:+PrintTenuringDistribution
-Xloggc:C:\Program Files\Apache Software Foundation\Tomcat 6.0\logs\heap.log
-XX:MaxPermSize=512m
-XX:+UseConcMarkSweepGC
-XX:NewSize=1024m
-Dfile.encoding=UTF-8
-Xdebug
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=8999
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
Rick
  • 121
  • 1
  • 5

1 Answers1

1

We ran into a similar issue and it ended up being firewall related because JMX RMI actually uses two ports, one you specify and one bound by the server at random. From:

http://blogs.oracle.com/jmxetc/entry/connecting_through_firewall_using_jmx

As you may already know if you have been confronted with this problem, the JMX RMI connector opens two ports: one is for the RMI registry, and it's the port that you usually supply with the -Dcom.sun.management.jmxremote.port= property. The other port is used to export JMX RMI connection objects. This second port is usually dynamically allocated at random. Indeed you don't need to know this port number in order to connect to the JMX agent: the only port number you need to know to connect is the RMI registry port number from which to obtain the connection objects.

This can cause problems if you have a restrictive firewall somewhere.

polynomial
  • 4,016
  • 14
  • 24