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

  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.