How do I monitor JBoss Web Server in JBoss ON configuration?

Solution Verified - Updated -

Environment

  • Red Hat JBoss Operation Networks (JON)
    • 3.3.x
  • Web Server (WS) management plug-in is installed for JBoss ON server
  • Tomcat Server resource has been imported into inventory
  • JBoss On agent has Web Server (WS) management plug-in installed
  • All Tomcat connectors resources are reported as down or unavailable

Issue

  • What is the correct way to enable remote JMX in JBoss Web Server (Tomcat)?
  • What is the correct Manager URL in JBoss ON connection setting?

Resolution


Disclaimer: The following information has been provided by Red Hat, but is outside the scope of the posted Service Level Agreements and Scope of Coverage. Red Hat does not support software contained in the EPEL repository, or other third-party repositories, or from third-party non-Red Hat sources. The information is provided as-is without representations or warranties about the suitability or accuracy of the information provided. The intent is to provide information to accomplish the system's needs. Use of the information below is at the user's own risk.

Links contained herein to external website(s) are provided for convenience only. Red Hat has not reviewed the links and is not responsible for the content or its availability. The inclusion of any link to an external website does not imply endorsement by Red Hat of the website or their entities, products or services. You agree that Red Hat is not responsible or liable for any loss or expenses that may result due to your use of (or reliance on) the external site or content.


  1. Edit {$CATALINA_HOME}/bin/setenv.sh, append below parameters to enable JMX for Tomcat (no authentication):

    CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8008 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
    

    In the above example, a random port 8008 is selected. It is important to choose an available port. For a secure environment, it is suggested to use authentication based remote JMX monitoring. See here.

  2. On a firewall enabled environment, open the JMX port number:

        # firewall-cmd --add-port=8008/tcp --permanent
        # firewall-cmd --reload
    
  3. Restart Tomcat service:

        # systemctl restart tomcat5-service
    
  4. Verify the port is opened:

        # telnet <Tomcat_Server_IP> 8008
    
  5. On the JBoss ON Console, edit Tomcat Manager URL in below format:

        service:jmx:rmi:///jndi/rmi://<hostname>:<portNum>/jmxrmi
    

    In the above example, specify the server IP address and port 8008.

  6. Wait for a while and see the Tomcat server availability status becomes connected.

Diagnostic Steps

  • If JBoss Web Server fails to start after changing the parameter, check the server log at {$CATALINA_HOME}/logs/catalina.out and journalctl -xe to determine the error and correct.
  • If the JBoss Web Server is still unable to show the correct availability status, check {$AGENT_HOME}/logs/agent.log for more details.

More Information

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments