0 Replies Latest reply on Oct 20, 2011 9:45 AM by Alexander Schulz

    How to open JMX ports for all servers in AS7 domain mode

    Alexander Schulz Newbie



      I'm trying to set up a domain configuration with AS7. I'm setting up a domain controller on one host and a host controller running two servers on another host. I only changed some minor properties of the default domain configuration.


      The domain is running. I can access the console webapp and see the servers. I can deploy an application and so far everything is fine.


      Now I'm doing load tests and I want to see the impact on the two servers. Because the monitoring functions in console webapp are very basic I would like to monitor the two servers (started and controlled by the host controller) by jmx with jconsole and later perhaps with nagios.


      I'm locking for a way to tell the servers to enable JMX but I can't find out how.


      This is my host.xml:

      <host xmlns="urn:jboss:domain:1.1"





                  <security-realm name="PropertiesMgmtSecurityRealm">


                          <properties path="mgmt-users.properties" relative-to="jboss.domain.config.dir"/>





                  <native-interface interface="management" port="1999"/>





          <remote host="" port="9999"/>




              <interface name="management">

                  <inet-address value="${jboss.bind.address.management:}"/>


              <interface name="public">

                 <inet-address value="${jboss.bind.address:}"/>





              <jvm name="default">

                <heap size="64m" max-size="128m"/>


                  <option value="-Djava.awt.headless=true"/>







              <server name="server-one" group="main-server-group">

                  <!-- server-one inherits the default socket-group declared in the server-group -->

                  <jvm name="default">


                          <!-- Try to fix LogManager problems when using jmx -->

                        <option value="-Djava.util.logging.manager=org.jboss.logmanager.LogManager"/>

                        <option value="-Dorg.jboss.logging.Logger.pluginClass=org.jboss.logging.logmanager.LoggerPluginImpl"/>

                        <option value="-Djboss.boot.server.log.dir=/opt/jboss_HC/domain/log"/>

                          <!-- JMX options -->

                        <option value="-Dcom.sun.management.jmxremote"/>

                        <option value="-Dcom.sun.management.jmxremote.port=9991"/>

                        <option value="-Dcom.sun.management.jmxremote.authenticate=false"/>

                        <option value="-Dcom.sun.management.jmxremote.ssl=false"/>





              <server name="server-two" group="main-server-group" auto-start="true">

                  <!-- server-two avoids port conflicts by incrementing the ports in

                       the default socket-group declared in the server-group -->

                  <socket-binding-group ref="standard-sockets" port-offset="150"/>

                  <jvm name="default">

                      <heap size="64m" max-size="256m"/>




              <server name="server-three" group="other-server-group" auto-start="false">

                  <!-- server-three avoids port conflicts by incrementing the ports in

                       the default socket-group declared in the server-group -->

                  <socket-binding-group ref="ha-sockets" port-offset="250"/>





      I tried to enable JMX by setting vm-props in the server configuration section. This throws errors with the LogMananager inititialization at startup of the server. I found several posting about LogManager problems when enabling JMX in JBoss 6 but no solution.


      Is there a way to enable JMX for all servers (not only the host/domain controller prozess)? If not, what would be the prefered way to get this informations (memory, threads, load, session count...) in a way that monitoring tools like nagios can use them?


      PS: JMX in standalone mode is no problem.


      Thank you in advance.