6 Replies Latest reply on Dec 15, 2011 2:22 AM by Bela Ban

    Cluster setup, using tcp in JBoss AS 6

    Reinhard Nappert Newbie

      Hi,

      I want to set my cluster up using tcp and tcpping for discovery. I want to avoid using udp.

      The startup command looks like:

       

      run.sh -b 0.0.0.0 -c all -g clusterA -Djgroups.bind_addr=<ip address of local node> -Djboss.default.jgroups.stack=tcp -Djgroups.tcpping.initial_hosts=<ip address of local node>:7600,<ip address of remoote node>:7600

       

      I changed the server/all/deploy/cluster/jgroups-channelfactory.sar/META-INF/jgroups-channelfactory-stacks.xml file, commenting the MPING element for the stack tcp and uncommenting the TCPPING, which looks like:

      <TCPPING

           initial_hosts="<ip address of local node>[7600],<ip address of remote node>[7600]"

           num_initial_members="2" port_range="1"

           timeout="3000"/>

       

      When I start the server, I get the following error:

      12:59:49,219 ERROR [JGroupsTransport] Errors instantiating [org.jboss.ha.ispn.De

      faultCacheContainerFactory$ChannelFactoryChannelLookup]!  Not using a channel lo

      okup.

      12:59:49,220 INFO  [JGroupsTransport] Unable to use any JGroups configuration me

      chanisms provided in properties {channelLookup=org.jboss.ha.ispn.DefaultCacheCon

      tainerFactory$ChannelFactoryChannelLookup, stack=tcp, channelFactory=org.jboss.h

      a.framework.server.JChannelFactory@55fe5c83, channelId=clusterA-HAPartition}.  Usi

      ng default JGroups configuration!

      12:59:49,236 INFO  [JChannel] JGroups version: 2.11.0.GA

       

      Any idea, why the ChannelLookup fails.

       

      Thanks,

      -Reinhard

        • 1. Re: Cluster setup, using tcp in JBoss AS 6
          Reinhard Nappert Newbie

          So, when I change my startup to:

           

          run.sh -b 0.0.0.0 -c all -g clusterA -Djgroups.bind_addr=<ip address of local node> -Djboss.default.jgroups.stack=tcp -Djgroups.tcpping.initial_hosts=<ip address of local node>[7600],<ip address of remoote node>[7600]

           

          I don't see this error anymore, but the discovery does not work, which it was working before, because the defaultJGroups conf was used.

           

          Now, I just get:

          17:07:51,657 INFO  [STDOUT]

          17:07:51,657 INFO  [STDOUT] ----------------------------------------------------

          ---------------

          17:07:51,657 INFO  [STDOUT] GMS: address=<local node>:1099, cluster=clusterA-HAPartition,

          physical address=<ip of local node>:55625

          17:07:51,657 INFO  [STDOUT] ----------------------------------------------------

          ---------------

          17:07:54,694 INFO  [JGroupsTransport] Received new cluster view: [<local node>:1099|0] [

          <local node>:1099]

           

          although the remote node is running with the cluster-name clusterA.

          So, it looks t me that TCPPING is not working.

           

          Any idea?

          -Reinhard

          • 2. Re: Cluster setup, using tcp in JBoss AS 6
            Reinhard Nappert Newbie

            I still did not make any progress. The discovery fails in a tcp cluster, using tcpping. I basically used two approaches:

            1. Pass system variable with the startup:
            -Djgroups.tcpping.initial_hosts=<ip address of local node>[7600],<ip address of remote node>[7600]

            or

            2. Setting initials_hosts attribute in the TCPPING element

            initial_hosts="<ip address of local node>[7600],<ip address of remote node>[7600]"

            in jgroups-channelfactory-stacks.xml

             

            None of the attempts was successful.

             

            I am sure that someone was able to set a tcp cluster up, using tcpping for discovery. So, any input is highly appreciated.

             

            Thanks

            • 3. Re: Cluster setup, using tcp in JBoss AS 6
              Wolf-Dieter Fink Master

              What IP addresses do you use?

              Is it the same network?

              Is there a firewall or other network stuff in between?

              • 4. Re: Cluster setup, using tcp in JBoss AS 6
                Reinhard Nappert Newbie

                I figured it out!

                It had to do with the tcp element in jgroups-channelfactory-stacks.xml. First, I analyzed the WARN messages in server.log, since it was telling me that some TCP aattributes were deprecated. One of them was start_port. There was no mentioing in  the clustering guide for 5.1 regarding the deprecation (but I guess this is anyway a jgroups item). Then, I remembered that I have read somewhere that bind_port shouild be used. So after I changed it to :

                ...

                <TCP

                                 singleton_name="tcp"

                                 bind_addr="${jgroups.bind_addr}"

                                 bind_port="${jboss.jgroups.tcp.tcp_port:7600}"

                ....

                 

                it works.

                 

                I have to admit that the documentation was not a great help to figure it out ....

                 

                Thanks

                • 5. Re: Cluster setup, using tcp in JBoss AS 6
                  Radoslav Husar Master

                  I figured it out!

                  Great, you can mark the tread as resolved btw so others know where to look ;-)