3 Replies Latest reply on Aug 28, 2012 2:16 AM by Wolf-Dieter Fink

    Cluster in JBOSS 5.1 is not working

    Rajeev Naik Newbie

      Hi,

       

      We have two machines running jboss 5.1. we need to run it in cluster configuration. Our load-balancer(HTTP server) is Apache 2.2.

      I configured jboss servers as per the doc in jobss link. Didn't work. The changes i had done is

      1. gave jvmRoute in jbossweb.sar\server.xml

      2. Configure the HTTPD apache web server for jvmRoutes

      3. Run the jboss with command run.bat -c <myProfile> -g DefultPartition -u 239.255.100.100 -b <machine ip>

       

      Then i configured servers as given in the link http://www.redhat.com/f/pdf/Mod_clusterWorkshop.pdf

      Still didn't work.

       

      The jboss doc says 'all' configuration has required files for clustering and no need to do anything. But it is not working.

       

      Please help.

       

      Note: I have also added <distributable/> in our web application.

      Previously in our application there were non-serializable objects and the server.log was giving error while replication due to non-serializable objects. Then i made all those to transient variables and then there were no errors. But replcation is not working.

       

      Please help.

        • 1. Re: Cluster in JBOSS 5.1 is not working
          Wolf-Dieter Fink Master

          I suppose that <myProfile> is a copy of the 'all' configuration.

          Do you see any message:

          GMS:

          and

            Number of cluster members

           

          these messages shows that the clustering is started.

           

          What about your environment, are both machines in the same subnetwork? Are a firewall/router in betwen.

          To get the cluster working (in all config) you need to have multicast enabled between the two servers.

          • 2. Re: Cluster in JBOSS 5.1 is not working
            Rajeev Naik Newbie

            Hi,

             

            Thanks for your reply.

             

            Yes, <myProfile> is copy of 'all' configuration.

            Yes, I see 'GMS' message: below are log details:

             

            GMS: address is <machine ip>:55200 (cluster=DefaultPartition)
            ---------------------------------------------------------
            2012-08-08 16:08:38,411 INFO  [STDOUT] (main)
            ---------------------------------------------------------
            GMS: address is <machine ip>:55200 (cluster=DefaultPartition-HAPartitionCache)
            ---------------------------------------------------------
            2012-08-08 16:08:40,067 INFO  [org.jboss.ha.framework.interfaces.HAPartition.DefaultPartition] (JBoss System Threads(1)-3) Number of cluster members: 1
            2012-08-08 16:08:40,083 INFO  [org.jboss.ha.framework.interfaces.HAPartition.DefaultPartition] (JBoss System Threads(1)-3) Other members: 0
            2012-08-08 16:08:40,427 INFO  [org.jboss.cache.RPCManagerImpl] (main) Received new cluster view: [<machine ip>:55200|0] [<machine ip>:55200]
            2012-08-08 16:08:40,427 INFO  [org.jboss.cache.RPCManagerImpl] (main) Cache local address is <machine ip>:55200

            ......

            2012-08-08 17:57:13,750 INFO  [org.jboss.ha.jndi.HANamingService] (main) Started HAJNDI bootstrap; jnpPort=1100, backlog=50, bindAddress=/<machine ip>

            2012-08-08 17:57:13,750 INFO  [org.jboss.ha.jndi.DetachedHANamingService$AutomaticDiscovery] (main) Listening on /<machine ip>:1102, group=<value given in -u parameter>, HA-JNDI address=<machine ip>:1100

            ......

            2012-08-08 16:08:44,286 INFO  [org.apache.coyote.ajp.AjpAprProtocol] (main) Initializing Coyote AJP/1.3 on ajp-<machine ip>-8009

             

            After deploying my application:

            [2012-08-10 18:24:32,545] 174474186 [HDScanner] INFO  org.jboss.cache.jmx.PlatformMBeanServerRegistration  - JBossCache MBeans were successfully registered to the platform mbean server.
            [2012-08-10 18:24:32,545] 174474186 [HDScanner] INFO  org.jgroups.JChannel  - JGroups version: 2.6.19.Final
            [2012-08-10 18:24:34,576] 174476217 [HDScanner] INFO  org.jboss.cache.RPCManagerImpl  - Received new cluster view: [<machine ip>:55200|0] [<machine ip>:55200]
            [2012-08-10 18:24:34,576] 174476217 [HDScanner] INFO  org.jboss.cache.RPCManagerImpl  - Cache local address is <machine ip>:55200
            [2012-08-10 18:24:34,576] 174476217 [HDScanner] INFO  org.jboss.cache.RPCManagerImpl  - state was retrieved successfully (in 2.02 seconds)

             

             

            Yes, both machines are on same subnetwork.

            Firewall is off.

             

            Regarding multicas enabling, i am new to network related configuration. Can you please give some suggestions on how to enable?

             

            Thanks and Regards

            Rajeev Naik

            • 3. Re: Cluster in JBOSS 5.1 is not working
              Wolf-Dieter Fink Master

              Do you start both instances with the same -u -g parameter?

              What if you start both instances on the same system, you might use port-offset parameter for run.bat

              Also you should check whether -Djava.net.preferIPv4Stack=true is enabled, you might check run.bat* or the boot.log file.

               

              I'm not sure what to do on Windows, what version do you use? For my Windows (XP, 7)it works without changes for a standard installation.

              But you have to stop the Windows firewall.

               

              To test and play with parameters you can also use the JGroups test itselve, see https://community.jboss.org/wiki/TestingJBoss