1

I have a CentOS+CPanel+Tomcat+Spring+MySQL+Flex architecture.

I need to monitor my application's memory because Tomcat is crashing from time to time. I read that JMX + Jconsole its a great choice. So i'm setting those variables in CATALINA_OPTS (in CPanel, you add the options in a file called tomcat.options). But I get an invalid port error. I tried with several port numbers: 8181, 8999, 3000. This is a tomcat.options file that doesn't work:

-Dcom.sun.management.jmxremote  
-Dcom.sun.management.jmxremote.port=8999  
-Dcom.sun.management.jmxremote.ssl=false  
-Dcom.sun.management.jmxremote.authenticate=false  
-Djava.rmi.server.hostname=li170-64

I googled the error and could not find anyone else with the same error. What's wrong?

Ernest
  • 239
  • 3
  • 12

1 Answers1

5

There were spaces after the port number line:

-Dcom.sun.management.jmxremote.port=8999(space)(space)

I removed it and it worked!

Ernest
  • 239
  • 3
  • 12
  • Thank you so very much for posting this finding. I cant tell you how handy this post came in. I knew i was doing everything right but still couldnt get this configuration to work. My attempt was in a WebSphere environment - but it still helped. space - so trivial yet so powerful !!! Chandana Shroff –  Feb 07 '12 at 04:21