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

      Hi,

       

      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"

            name="domain1">

       

          <management>

              <security-realms>

                  <security-realm name="PropertiesMgmtSecurityRealm">

                      <authentication>

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

                      </authentication>

                  </security-realm>

              </security-realms>

              <management-interfaces>

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

              </management-interfaces>

          </management>

       

          <domain-controller>

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

          </domain-controller>

       

          <interfaces>

              <interface name="management">

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

              </interface>

              <interface name="public">

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

              </interface>

          </interfaces>

       

           <jvms>

              <jvm name="default">

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

              <jvm-options>

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

                     

              </jvm-options>

             </jvm>

           </jvms>

       

          <servers>

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

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

                  <jvm name="default">

                    <jvm-options>

                          <!-- 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"/>

                    </jvm-options>

                 </jvm>

              </server>

       

              <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"/>

                  </jvm>

              </server>

       

              <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"/>

              </server>

          </servers>

      </host>

       

      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.

      Alex