5 Replies Latest reply on May 28, 2010 2:33 PM by Paul Ferraro

    Not able to configure mod_cluster with JBoss 6.0.0.M1 on single machine

    Bhaswar Goswami Newbie

      Hi everyone,

       

      I am trying to setup a Clustered  JBoss6.0.0.M1 environment locally in a single machine and have done the necessary configurations for the same.

      I have followed the link : http://community.jboss.org/wiki/UsingModjk12WithJboss for the same.

       

      Environment details as follows :

       

      1. HTTP Server

      2. two JBoss6.0.0.M1 node 

       

      and all of them are running in single machine.

       

       

      I have configured two IP as well for my machine and also able ping those to IPs .

       

      Now, when I start the two instance with -b option as follows :

       

      run.bat -c nodeA -b xx.xx.xx.xx -Djboss.service.binding.set=ports-01 -Djboss.messaging.ServerPeerID=1

       

      run.bat -c nodeB -b xx.xx.xx.xx -Djboss.service.binding.set=ports-01 -Djboss.messaging.ServerPeerID=2

       

      these two instances run properly , but ther don't form a cluster and are de-cupled for some reason.

       

      Both the servers give me message as follows and but, don't pick up other instance that we expect to happen:

       

      17:37:13,562 INFO  [GroupMember] org.jboss.messaging.core.impl.postoffice
      0] [10.80.5.193:1125], old view is null
      17:37:13,562 INFO  [GroupMember] I am ( XX.XX.XX.XX:1125)
      17:37:13,562 INFO  [GroupMember] New Members : 1 ([XX.XX.XX.XX:1125])
      17:37:13,562 INFO  [GroupMember] All Members : 1 ([XX.XX.XX.XX:1125])
      17:37:13,593 INFO  [STDOUT]

       

      I am just wondering what we are missing out here or it' not possible if we don't have multicast IPs in the mod_cluster.

       

      Please, help me to sort this out.

        • 2. Re: Not able to configure mod_cluster with JBoss 6.0.0.M1 on single machine
          Paul Ferraro Master

          There may be something awry with your bind addresses.  Try using the same bind address for both servers, e.g. -b localhost, but using different port sets, e.g.

          -Djboss.service.binding.set=ports-default

          -Djboss.service.binding.set=ports-01

           

          The logs lines you've attached refer to JBoss messaging - not mod_cluster.  mod_cluster only uses multicast in 2 places, both are optional:

          1. If advertise is enabled, then your httpd instance will multicast an advertise message to the jboss instances.  As Jean-Frederic mentioned, you can use a static proxyList as an non-multicast alternative - or by call the addProxy(...) JMX methods.

          2. If your AS nodes are configured to use HAModClusterService, then multicast is used by default for group communication and discovery.  As a non-multicast alternative, you can re-configure the HAPartition used by mod_cluster to use a TCP-based jgroups stack; or use ModClusterService instead, which does not require multicast.

          • 3. Re: Not able to configure mod_cluster with JBoss 6.0.0.M1 on single machine
            Bhaswar Goswami Newbie

            Thank you Paul and Jean-Frederic for you replies.

             

            I have tried to switch to the  ModClusterService in the file : jbossweb.sar\META-INF\jboss-beans.xml

             

            as follows :

             

              <bean name="ModClusterListener" mode="On Demand">
                <constructor>
                 <parameter><inject bean="ModClusterService"/></parameter>
                </constructor>
              </bean>

             

              <bean name="ModClusterService" mode="On Demand">
                <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX (name="jboss.web:service=ModCluster",exposedInterface=org.jboss.modcluster.ModClusterServiceMBean.class)</annotation>
                <constructor>
                  <parameter><inject bean="ModClusterConfig"/></parameter>
                  <parameter><inject bean="DynamicLoadBalanceFactorProvider"/></parameter>
                </constructor>
              </bean>

             

            Now, if start the server it complains as folows:

             

             

            2010-05-27 12:31:56,832 INFO  [org.jboss.mx.remoting.service.JMXConnectorServerService] (Thread-2) JMX Connector server: service:jmx:rmi://10.80.5.193/jndi/rmi://10.80.5.193:1190/jmxconnector
            2010-05-27 12:31:57,191 INFO  [org.jboss.mail.MailService] (Thread-2) Mail Service bound to java:/Mail
            2010-05-27 12:31:57,395 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (Thread-2) Error installing to Instantiated: name=ModClusterService state=Described mode=On Demand requiredState=Installed
            java.lang.IllegalArgumentException: Wrong arguments. new for target java.lang.reflect.Constructor expected=[org.jboss.modcluster.config.ModClusterConfig, org.jboss.modcluster.load.LoadBalanceFactorProviderFactory] actual=[org.jboss.modcluster.config.ha.HAModClusterConfig, org.jboss.modcluster.load.impl.DynamicLoadBalanceFactorProvider
            ]
            at org.jboss.reflect.plugins.introspection.ReflectionUtils.handleErrors(ReflectionUtils.java:395)
            at org.jboss.reflect.plugins.introspection.ReflectionUtils.newInstance(ReflectionUtils.java:153)
            at org.jboss.reflect.plugins.introspection.ReflectConstructorInfoImpl.newInstance(ReflectConstructorInfoImpl.java:106)
            at org.jboss.joinpoint.plugins.BasicConstructorJoinPoint.dispatch(BasicConstructorJoinPoint.java:80)
            at org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.createTarget(AOPConstructorJoinpoint.java:295)
            at org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.dispatch(AOPConstructorJoinpoint.java:116)
            at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:243)
            at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
            at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:111)
            at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:72)
            at org.jboss.kernel.plugins.dependency.InstantiateAction.installActionInternal(InstantiateAction.java:66)
            at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
            at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
            at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

             

             

             

            I have seen the following discussion on this http://community.jboss.org/thread/34965

             

            So, I have tried switching to the listener class to : MicrocontainerIntegrationLifecycleListener as well and specifiying the type parameter in the

            ModClusterService bean defeinition.

             

            But still have the same problem

            • 4. Re: Not able to configure mod_cluster with JBoss 6.0.0.M1 on single machine
              Bhaswar Goswami Newbie

              sorry for the wrong Log and the correct one is as follows

               

              13:50:56,576 INFO  [GroupMember] I am (xx.xx.xx.xx:2111)
              13:50:56,576 INFO  [GroupMember] New Members : 1 ([xx.xx.xx.xx:2111])
              13:50:56,576 INFO  [GroupMember] All Members : 1 ([xx.xx.xx.xx:2111])
              13:50:56,622 INFO  [STDOUT]

               

              I expect here the second Server to be registered here when that is up , but that was not happening .

              • 5. Re: Not able to configure mod_cluster with JBoss 6.0.0.M1 on single machine
                Paul Ferraro Master

                You've encountered this bug.

                https://jira.jboss.org/browse/MODCLUSTER-116

                 

                In general, if you're going to use a mod_cluster release from the 1.1.x series, I recommend you use the latest release (currently 1.1.0.CR2) to avoid running into issues that have already been fixed.

                One of the advantages of using 1.1.0.CR2 over the 1.1.0.Beta1 version included with AS 6.0.0.M1, is that most of these configuration gotchas have been simplified.

                To use 1.1.0.CR2, with a vanilla JBoss AS 6.0.0.Mx release, all you need to do is replace the existing $JBOSS_HOME/server/<profile>/deploy/mod_cluster.sar with the corresponding sar from the mod_cluster release tarball.  And that's it.

                No changes to jbossweb's server.xml nor jboss-beans.xml files are necessary.

                As of 1.1.0.CR2, the default mod_cluster configuration uses HAModClusterService.  Changing this to use ModClusterService instead (which has no dependencies on JBoss clustering), simply swap the name of the bean injected into the ModClusterListener bean as described here:

                http://www.jboss.org/mod_cluster/java/config.html

                 

                mod_cluster 1.1.0.CR2 is already integrated into AS trunk, and will appear in the upcoming AS 6.0.0.M4 release.  As of this release, mod_cluster will work right out of the box - with no configuration changes required.  It will be deployed by default in the "all" and "default profiles".  The "all" profile will be configured to use HAModClusterService, while the "default" profile configured to use ModClusterService (since "default" does not include JBoss clustering).