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