1
votes

I am working on CentOS 6.3 64 bit machine. I have set the following in catalina.sh export CATALINA_OPTS="-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=7010 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"

When I restart tomcat after this addition, tomcat does not start. I have disabled the firewall. Can anyone help me with this issue? Thanks

2
Any error messages reported?Nicholas
No. There was no error. I found that tomcat had not started when I checked it through browserAutumn
I am still not able to resolve this issue. the tough part here is, no error is being thrown. I have added the CATALINA_OPTS to use jconsole which uses jmx port. Is there any other way to resolve this issue and start jconsole as well?Autumn

2 Answers

1
votes

I have found the solution for this issue. Basically whenever i added CATALINA_OPTS, it could not find the hostname. Hence i added the host name in /etc/init.d/hosts file:
127.0.0.1 localhost your_hostname
This resolved the issue. I am ale to run jconsole as well as jvisualvm on this port now.

0
votes

The fact that you're not seeing any error message makes me think that the command line string being built to launch tomcat has some subtle error in it, causing the JVM to not launch at all, or abort because it's being given a bogus directive. Usually what I do in these cases is edit the launch script, find the spot where the full command string is executed and add an echo of the same string. That way, when the script launches, I can see the exact command that is being issued and test executing myself without the script.

I don't think you are facing a major issue here, but if you want to ditch the startup parameter driven JMX options, you can always add a quickie startup servlet to your admin WAR that creates and starts a JMXConnectorServer.

Sounds like overkill, but it does give you a bit more flexibility in the configuration details of the listener. For example, by default, the default command line options will result in a listener bound to the local address only, so incoming connections from remotes will fail. On the other hand, if you configure the connector server yourself in a servlet, you can direct the listener to bind to 0.0.0.0.