4 Replies Latest reply on Aug 22, 2011 1:07 PM by Bryan Shepherd

    Basic jboss clustering for jboss-as-web-7.0.0.Final

    Bryan Shepherd Newbie

      In AS6 the clustering happened automatically and you were able to specify your jgroup name with a "-g <somename>" parm for the run.sh file.  Just looking for this equivalent in AS7.  Also, there was a message printed to the log so you could determine your cluster was communicating with all the servers.


      So I guess I am looking for the following on AS7:

         - where do I set the cluster group name?

         - how do I validate the cluster is communicating?

         - does everything autowire as it did in AS6?


      I am looking to cluster 2 standalone JBoss AS7 servers running on 2 different vms (the vms are on separate physical servers).  I am starting my servers using the standalone-ha.xml config file.


      Can someone help me out with this.  I am not much of an admin per say and am relatively new to JBoss.


      best regards,


        • 1. Re: Basic jboss clustering for jboss-as-web-7.0.0.Final
          Paul Ferraro Master

          For starters, use 7.0.1.Final (just released).  There are a number of clustering fixes that you'll not want to be without.

          Second, in AS7 (as with AS6), you don't need to set a group name unless you intend to actually have multiple groups in your cluster.

          When you start your servers via standalone-ha.xml, you will not see any cluster formation.  In AS7, a cluster does not form unless a distributable deployment demands it to start.  The first time a <distributable/> web application is deployed, you should see logs in your server.log indicating cluster formation.  And yes, everything auto-wires as it did in AS6.

          From a practical standpoint, there is one configuration change you'll have to make to get clustering to work.  Within standalone-ha.xml, look for the following configuration block.



                  <interface name="management">

                      <inet-address value=""/>


                  <interface name="public">

                     <inet-address value=""/>



              <socket-binding-group name="standard-sockets" default-interface="public">




          As indicated by the default-interface attribute of the socket-binding-group, the "public" interface is used as the bind address for all socket bindings (including those for clustering services).  You will need to change this on each server to use an appropriate non-loopback network interface so that your 2 servers can communicate.  That's it.  Everything else should just work.

          • 2. Re: Basic jboss clustering for jboss-as-web-7.0.0.Final
            Simon Martinelli Novice

            Two questions:



            With AS 5.1 is started the server with

            -g EntwPartition -u


            Where can I set this parameters in AS 7.



            I used a network drive to deploy the application and configured it in conf/bootstrap/profile.xml

            <bean name="BootstrapProfileFactory" class="org.jboss.system.server.profileservice.StaticClusteredProfileFactory">
              <property name="applicationURIs">
                <list elementClass="java.net.URI">
                  <value>file:/j:/Stab/T Dok/Projekte/400 Architektur/010 SW-Architektur/JBoss/deploy</value>

            How can I do that with AS7?


            • 3. Re: Basic jboss clustering for jboss-as-web-7.0.0.Final
              Paul Ferraro Master

              1. The group name (i.e. -g) used for web session clustering in AS7 is the name of the infinispan cache container used to store web sessions, "web" by default.  Unless you actually intend to have multiple groups communicating using the same multicast address, you don't need to override this.

              The udp multicast address (i.e. -u) is defined by the multicast-address of the jgroups-udp socket binding.


                  <socket-binding-group name="standard-sockets" default-interface="public">

                       <!-- ... -->

                      <socket-binding name="jgroups-udp" port="55200" multicast-address="" multicast-port="45688"/>

                      <!-- ... -->



              2. http://community.jboss.org/wiki/DeployingAnApplicationFromAnExternalDeploymentLocation

              • 4. Re: Basic jboss clustering for jboss-as-web-7.0.0.Final
                Bryan Shepherd Newbie

                I will get 7.0.1 and give it a try.  Thank you for the assistance.