8 Replies Latest reply on Sep 9, 2014 3:44 PM by T L

    Correct way to configure discovery and broadcast groups with TCP

    T L Newbie

      I am using JBOSS EAP 6.2 with AS 7.3.  AS 7.3 does not recognize the <jgroups-file> element available, so I have to use the <jgroups-stack> element.

      UDP multicast broadcast and discovery group configuration works fine, of course.  But, I cannot get the TCP to work with the discovery groups and broadcast groups.

      I have the following:

       

           <connectors>

            <netty-connector name="netty" socket-binding="messaging"/> <!-- port 5445 -->

           </connectors>

       

                 <stack name="tcp">

                        <transport type="TCP" socket-binding="jgroups-tcp"/>

                        <protocol type="TCPPING">

                             <property name="initial_hosts">192.168.2.14[7600], 192.168.2.14[7700]</property>

                        </protocol>

                        <protocol type="MERGE2"/>

                        <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>

                        <protocol type="FD"/>

                        <protocol type="VERIFY_SUSPECT"/>

                        <protocol type="pbcast.NAKACK"/>

                        <protocol type="UNICAST2"/>

                        <protocol type="pbcast.STABLE"/>

                        <protocol type="pbcast.GMS"/>

                        <protocol type="UFC"/>

                        <protocol type="MFC"/>

                        <protocol type="FRAG2"/>

                   <protocol type="RSVP"/>

          </stack>

       

                      <broadcast-groups>

                          <broadcast-group name="bg-group1">

                              <jgroups-stack>tcp</jgroups-stack>

                              <jgroups-channel>my-cluster</jgroups-channel>

                              <broadcast-period>5000</broadcast-period>

                              <connector-ref>

                                  netty

                              </connector-ref>

                          </broadcast-group>

                      </broadcast-groups>

       

                      <discovery-groups>

                          <discovery-group name="dg-group1">

                              <jgroups-stack>tcp</jgroups-stack>

                              <jgroups-channel>my-cluster</jgroups-channel>

                              <refresh-timeout>10000</refresh-timeout>

                          </discovery-group>

                      </discovery-groups>

                      <cluster-connections>

                          <cluster-connection name="my-cluster">

                              <address>jms</address>

                              <connector-ref>netty</connector-ref>

                              <discovery-group-ref discovery-group-name="dg-group1"/>

                          </cluster-connection>

                      </cluster-connections>

       

       

      When starting the live server, this is what I the following from the log:

       

      INFO  [stdout] (MSC service thread 1-6) GMS: address=nodeA/my-cluster, cluster=my-cluster, physical address=192.168.2.14:7600

      (MSC service thread 1-6) HQ224000: Failure in initialisation: java.lang.IllegalStateException: channel is closed

        at org.jgroups.JChannel.checkClosed(JChannel.java:865) [jgroups-3.2.7.Final.jar:3.2.7.Final]

        at org.jgroups.JChannel._preConnect(JChannel.java:520) [jgroups-3.2.7.Final.jar:3.2.7.Final]

        at org.jgroups.JChannel.connect(JChannel.java:277) [jgroups-3.2.7.Final.jar:3.2.7.Final]

        at org.jgroups.JChannel.connect(JChannel.java:268) [jgroups-3.2.7.Final.jar:3.2.7.Final]

        at org.hornetq.api.core.JGroupsBroadcastGroupConfiguration$JGroupsBroadcastEndpoint$JChannelWrapper.connect(JGroupsBroadcastGroupConfiguration.java:353) [hornetq-core-client-2.3.21.jar:]

        at org.hornetq.api.core.JGroupsBroadcastGroupConfiguration$JGroupsBroadcastEndpoint.internalOpen(JGroupsBroadcastGroupConfiguration.java:203) [hornetq-core-client-2.3.21.jar:]

        at org.hornetq.api.core.JGroupsBroadcastGroupConfiguration$JGroupsBroadcastEndpoint.openBroadcaster(JGroupsBroadcastGroupConfiguration.java:182) [hornetq-core-client-2.3.21.jar:]

        at org.hornetq.core.server.cluster.impl.BroadcastGroupImpl.start(BroadcastGroupImpl.java:108) [hornetq-server-2.3.21.jar:]

        at org.hornetq.core.server.cluster.ClusterManager.start(ClusterManager.java:268) [hornetq-server-2.3.21.jar:]

        at org.hornetq.core.server.impl.HornetQServerImpl.initialisePart2(HornetQServerImpl.java:1658) [hornetq-server-2.3.21.jar:]

        at org.hornetq.core.server.impl.HornetQServerImpl.access$1400(HornetQServerImpl.java:178) [hornetq-server-2.3.21.jar:]

        at org.hornetq.core.server.impl.HornetQServerImpl$SharedNothingLiveActivation.run(HornetQServerImpl.java:2831) [hornetq-server-2.3.21.jar:]

        at org.hornetq.core.server.impl.HornetQServerImpl.start(HornetQServerImpl.java:435) [hornetq-server-2.3.21.jar:]

        at org.hornetq.jms.server.impl.JMSServerManagerImpl.start(JMSServerManagerImpl.java:490) [hornetq-jms-server-2.3.21.jar:]

        at org.jboss.as.messaging.jms.JMSService.start(JMSService.java:74) [jboss-as-messaging-7.2.0.Final.jar:7.2.0.Final]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]

        at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]

       

      What is the correct way to configure this?

      What does the <jboss-channel> need to be set to?  Why is the channel 'closed?'

      Is the tcp stack set up correctly?

      Any help will be greatly appreciated.