Freigeben über


Tomcat 5.5: Additional Steps to Connect to the MBean Server

As part of SCOM 2012, there is a feature to discover and monitor Java Application Servers (support matrix listed here).  This release supports Tomcat 5.5.x, 6.x, and 7.x,  For Tomcat 5.5.x, the default application server settings do not allow the application server to have access to the JMX Store.

From an end-user perspective, you would notice this if you make a directory call to BeanSpy and receive an empty list of MBeans.  For example, the REST-like query of https://localhost:8080/BeanSpy/MBeans?JMXQuery=Catalina:&MaxDepth=0 (where the hostname and port are adjusted as necessary) should return back a list of all the MBeans that are associated with the Catalina JMX Store.  If this query is empty, then the issue is that BeanSpy does not have the proper permissions to access these MBeans.

Similarly from witin the SCOM 2012 Console this could be the reasons that a Tomcat 5.5.x instance does not discover any applications for that deep monitored application server.  Luckily, there is a Monitor in the Microsoft.Tomcat.Library.mp that should alert the user if there is a configuration error.  The name of the monitor is Microsoft.JEE.Tomcat.ConfigurationHealth.JmxStoreConnection.Monitor, in the Health Explorer it should appear underneath the Deep Monitored Application Server's Configuration Health. The Knowledge Article associated with the alert is below.

 

Summary
The JMX Store connection configuration health monitor determines if a connection to the application server-specific JMX Store can be established.

Causes
An unhealthy state indicates that a connection to the "Catalina" JMX Store could not be established.

Resolutions
Check the configuration for the Tomcat web application server and verify that it has been configured to allow access to the application server created MBeans. Refer to the Tomcat web application server documentation regarding Monitoring and Managing Tomcat.

 

The correct fix is documented in the OpsMgr_MP_Tomcat.docx, but here is a summary of the Apache documentation of it is that the catalina startup script needs to be modified (i.e. catalina.bat or catalina.sh).

For Windows, modify the catalina.bat:

  set JAVA_OPTS=%JAVA_OPTS% %LOGGING_MANAGER%
 rem -- inserted to script (start)
 rem ---- Necessary to provide access to Catalina MBeans to BeanSpy
 set JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=6969 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
 rem -- inserted to script (end)
 rem ----- Run The Requested Command ------------------------
 

For Unix/Linux, modify the catalina.sh script: 

  # inserted to script (start)
 # Necessary to provide access to Catalina MBeans to BeanSpy
 JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=6969 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
 # inserted to script (end)
 
 # ----- Run The Requested Command ------------------------

 

 

Link to Apache 5.5 Documenation: Monitoring and Managing Tomcat

Comments

  • Anonymous
    December 05, 2013
    Hi, I'm getting this on some Tomcat 5.5 servers we're newly deploying on SCOM 2012. However, we don't seem to have a catalina.bat existing on the Tomcat install. I believe this may be because it's set up as a service (it's a third party app so don't want to modify too much if possible). Any idea whether we just have to put up with the JMX warning being created, or its ok to override the alert, or if there's a solution? Thanks :)

  • Anonymous
    December 05, 2013
    The comment has been removed

  • Anonymous
    December 08, 2013
    Thanks Christopher - I'm experienced with IIS and so somewhat a Tomcat newb!

  • Anonymous
    December 09, 2013
    NP

  • Anonymous
    July 07, 2014
    I'm seeing this error in Tomcat 6. We running Tomcat as a Windows service. I confirmed the settings are applied in the Java options. I can even connect without issue using a Jconsole from our SCOM server to the JMX port.

    Any ideas??

  • Anonymous
    July 07, 2014
    Here are the Tomcat Java options:

    -Dcom.sun.management.jmxremote
    -Dcom.sun.management.jmxremote.port=8086
    -Dcom.sun.management.jmxremote.ssl=false
    -Dcom.sun.management.jmxremote.authenticate=false
    -Djava.rmi.server.hostname=hqarchd01.tbtest.tolltest.com