7 Replies Latest reply on May 25, 2013 9:11 PM by Jason Shepherd

    Message redistribution does not work in clustered environment

    Ruslan Danilin Newbie

      Hello,

      I have two nodes (lets say NodeA and NodeB) in clustered configuration with full-ha profile (domain.xml file is attached).

      EJB clustering works just fine, web clustering also works pretty well with mod_cluster. But JMS does not.

      So, for example, when I send message via remote standalone client to testQueue on NodeA, I can receive it only on NodeA.

      There is no message redistribution to NodeB even if on NodeA there isn't any connected receivers. I can not receive this message on NodeB.

       

      Following params are setted in domain.xml:

      <redistribution-delay>0</redistribution-delay>

      <forward-when-no-consumers>false</forward-when-no-consumers>

       

      I want messages that came to NodeA where redestributed on NodeB too.

      Then I'd like to achieve HA functionality, so if some node will down, other will deliver messages to recepients.

       

        How this is possible to do?

        • 1. Re: Message redistribution does not work in clustered environment
          Justin Bertram Master

          Please attach the full server.log from each of your nodes.

          • 2. Re: Message redistribution does not work in clustered environment
            Ruslan Danilin Newbie

            my servers logs are attached. Here is what I can see is those logs:

             

            10:07:26,719 WARN  [org.hornetq.core.server.cluster.impl.BroadcastGroupImpl] (MSC service thread 1-1) local-bind-address specified for broadcast group but no local-bind-port specified so socket will NOT be bound to a local address/port

             

            also I do not see any messages that bridge between two servers has been set up.

            • 3. Re: Message redistribution does not work in clustered environment
              Justin Bertram Master

              That WARN message is the underlying problem.  Therefore, you need to set <local-bind-port> on your <broadcast-group>, e.g.:

               

                                  <broadcast-groups>
                                      <broadcast-group name="bg-group1"> 
                                          <local-bind-port>9877</local-bind-port>
                                          <group-address>231.7.7.7</group-address>
                                          <group-port>9876</group-port>
                                          <broadcast-period>5000</broadcast-period>
                                          <connector-ref>
                                              netty
                                          </connector-ref>
                                      </broadcast-group>
                                  </broadcast-groups>
              
              • 4. Re: Message redistribution does not work in clustered environment
                Ruslan Danilin Newbie

                Thank you for your reply, Justin.

                I've just added <local-bind-port>9877</local-bind-port> in domain.xml and there is no those WARN message at the moment. But, unfortunatelly, it does not help.

                • 5. Re: Message redistribution does not work in clustered environment
                  Justin Bertram Master

                  Do you see any messages in the log indicating that a HornetQ cluster bridge is being created?  It would look something like this:

                   

                  INFO  [org.hornetq.core.server.cluster.impl.BridgeImpl] (Thread-11 (HornetQ-server-HornetQServerImpl::serverUUID=510fe2cb-bb0d-11e1-9e62-0024d7397f8c-1402634)) Bridge ClusterConnectionBridge@aaa392 [name=sf.my-cluster.c7afbeee-bb10-11e1-ac48-0024d7397f8c, queue=QueueImpl[name=sf.my-cluster.c7afbeee-bb10-11e1-ac48-0024d7397f8c, postOffice=PostOfficeImpl [server=HornetQServerImpl::serverUUID=510fe2cb-bb0d-11e1-9e62-0024d7397f8c]]@13cf887 targetConnector=ServerLocatorImpl (identity=(Cluster-connection-bridge::ClusterConnectionBridge@aaa392 [name=sf.my-cluster.c7afbeee-bb10-11e1-ac48-0024d7397f8c, queue=QueueImpl[name=sf.my-cluster.c7afbeee-bb10-11e1-ac48-0024d7397f8c, postOffice=PostOfficeImpl [server=HornetQServerImpl::serverUUID=510fe2cb-bb0d-11e1-9e62-0024d7397f8c]]@13cf887 targetConnector=ServerLocatorImpl [initialConnectors=[org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port=5445&host=localhost2-localdomain], discoveryGroupConfiguration=null]]::ClusterConnectionImpl@22380264[nodeUUID=510fe2cb-bb0d-11e1-9e62-0024d7397f8c, connector=org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port=5445&host=localhost, address=jms, server=HornetQServerImpl::serverUUID=510fe2cb-bb0d-11e1-9e62-0024d7397f8c])) [initialConnectors=[org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port=5445&host=localhost2-localdomain], discoveryGroupConfiguration=null]] is connected
                  
                  • 6. Re: Message redistribution does not work in clustered environment
                    Ruslan Danilin Newbie

                    No, I do not see any messages about bridge creation.

                     

                    I've tried also to add <cluster-password>passforjmstest</cluster-password> sttring to domain.xml

                    and also I've deleted port offset from host.xml file. But there is still no messages about bridge creation.

                    Attached you can find my current domain.xml and servers logs file.

                     

                    If somebody has proper domain.xml config file to achieve message redistribution between application servers

                    on different boxes - please share.

                    • 7. Re: Message redistribution does not work in clustered environment
                      Jason Shepherd Newbie

                      I also ran into this issue on JBoss AS 7.1.1. However I was able to resovle it by specifying local-bind-address on both broadcast group, and discovery group.

                       

                                          <broadcast-groups>

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

                                                  <local-bind-address>10.1.1.1</local-bind-address>

                                                  <local-bind-port>9877</local-bind-port>

                                                  <group-address>231.7.7.7</group-address>

                                                  <group-port>9876</group-port>

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

                                                  <connector-ref>

                                                      netty

                                                  </connector-ref>

                                              </broadcast-group>

                                          </broadcast-groups>

                       

                       

                                          <discovery-groups>

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

                                                  <local-bind-address>10.1.1.2</local-bind-address>

                                                  <group-address>231.7.7.7</group-address>

                                                  <group-port>9876</group-port>

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

                                              </discovery-group>

                                          </discovery-groups>

                       

                       

                      But I could not share the configuration of the 2 settings using domain mode because of this bug, so I had to upgrade to AS 7.1.2.

                       

                         https://issues.jboss.org/browse/AS7-3881