VMware Cloud Community
stanley_hyperic
Contributor
Contributor

Tomcat

Hi,

I try to enable Tomcat / JMX, and I encounter the following error:

The configuration has not been set for this resource due to : Invalid configuration: Error contacting resource: Can't connect to MBeanServer [{jmx.password=manager, jmx.username=tomcat, jmx.url=service:jmx:rmi:///jndi/rmi://10.10.10.10:6969/jmxrmi}]: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: java.net.SocketTimeoutException: Read timed out]

However, when I type 10.10.10.10:6969 on the browser, I can see the "MX4J/Http Adaptor console", both from the local Tomcat or remote machine.

What can be wrong?

I added this at the end of catalina.sh

if [ "$1" != "stop" ] ; then
set JAVA_OPT = "-Dcom.sun.management.jmxremote \
-Dcom.sun.management.jmxremote.port = 6969 \
-Dcom.sun.management.jmxremote.authenticate = false $JAVA_OPTS"
export JAVA_OPTS
fi


I also modify server.xml as follows:

<Connector port="8009" protocol="AJP/1.3" enableLookups="true"
maxPostSize="0" redirectPort="8443" handler.list="mx" mx.enabled="true" mx.httphost="10.10.10.10"
mx.httpPort="6969" />
0 Kudos
2 Replies
MarieMcGarry
Enthusiast
Enthusiast

Hi Stanley,

I'm sorry that you are having trouble. What version of Tomcat do you have? What operating system?

Your note doesn't say whether you configured and enabled the filter that is required. The instructions for setting up to monitor Tomcat 5.5 are on this page:

http://support.hyperic.com/display/hypcomm/Tomcat+5.5+server

There are other pages for 4.0, 4.1, 5.0, and 6.0. Hope this helps.

m
0 Kudos
bclark_hyperic
Enthusiast
Enthusiast

Hello,

I have this working and I have my JAVA_OPTS setup like you do, but I don't have anything defined in my server.xml like you do here:
handler.list="mx" mx.enabled="true" mx.httphost="10.10.10.10" mx.httpPort="6969"

Could the Java settings be conflicting with your Tomcat server.xml settings? I suggest removing the above items from your server.xml, restarting Tomcat, and seeing if you get better results.

Brian
0 Kudos