2012-08-23 124 views
1

我在下面提供了我的消息傳遞配置。任何人都可以讓我知道爲什麼hornetq循環在集羣中發生。在所有實例中,我們在啓動服務器之前刪除了數據和臨時目錄。所有服務器都以localhost作爲綁定地址啓動。JBOSS Standalone HornetQ多播羣集在羣集中引發循環

任何人都可以指定我們是否需要保持羣集中所有節點的<local-bind-port>一致。

我們已經配置了JBOSS 7.1.1 Final的Multicast Cluster(HornetQ)。當我們在3個獨立的物理服務器啓動JBOSS服務器3分的情況下,它開始加載我的日誌與此消息

18:38:14325 INFO [org.hornetq.core.server.cluster.impl.BridgeImpl] (Thread-13(HornetQ-server-HornetQServerImpl :: serverUUID = 458fb681-ed23-11e1-8bbf-c42c031d96aa-23095497))Bridge ClusterConnectionBridge @ 1a3fe65 [name = sf.config-cluster.3afb4e60-ed20-11e1-831c-109add44c09e, queue = QueueImpl [name = sf.config-cluster.3afb4e60-ed20-11e1-831c-109add44c09e,postOffice = PostOfficeImpl [server = HornetQServerImpl :: serverUUID = 458fb681-ed23-11e1-8bbf-c42c031d96aa]] @ 192b987 targetConnector = ServerLocatorImpl( identity =(Cluster-connection-bridge :: ClusterConnectionBridge @ 1a3fe65 [name = sf.config-cluster.3afb4e60-ed20-11e1-831c-109add44c09e,queue = QueueImpl [name = sf.config-cluster.3afb4e60-ed20-11e1- 831C-109add44c09e ,postOffice = PostOfficeImpl [server = HornetQServerImpl :: serverUUID = 458fb681-ed23-11e1-8bbf-c42c031d96aa]] @ 192b987 targetConnector = ServerLocatorImpl [initialConnectors = [org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port = 5445 & host = localhost],discoveryGroupConfiguration = null]] :: ClusterConnectionImpl @ 30045119 [nodeUUID = 458fb681-ed23-11e1-8bbf-c42c031d96aa,connector = org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port = 5445 & host = localhost,address = jms,server = HornetQServerImpl :: serverUUID = 458fb681-ed23-11e1-8bbf-c42c031d96aa]))[initialConnectors = [org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port = 5445 & host = localhost ],discoveryGroupConfiguration = null]]已連接

18:38:14,388 WARN [org.hornetq.core.server.cluster.impl.ClusterConnection Impl](Thread-4(HornetQ-client-global-threads-20937207))MessageFlowRecordImpl [nodeID = 3afb4e60-ed20-11e1-831c-109add44c09e,connector = org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port = 5445 & host = localhost,queueName = sf.config-cluster.3afb4e60-ed20-11e1-831c-109add44c09e,queue = QueueImpl [name = sf.config-cluster.3afb4e60-ed20-11e1-831c-109add44c09e,postOffice = PostOfficeImpl [ server = HornetQServerImpl :: serverUUID = 458fb681-ed23-11e1-8bbf-c42c031d96aa]] @ 192b987,isClosed = false,firstReset = true] ::遠程隊列綁定jms.queue.extractorQueue458fb681-ed23-11e1-8bbf-c42c031d96aa已經在郵局約束。最有可能的原因是由於集羣最大跳數太大或者您有多個集羣連接到使用重疊地址的相同節點,因此您的集羣中有一個環路

18:38:14,391 WARN [org.hornetq。 core.server.cluster.impl.ClusterConnectionImpl](Thread-4(HornetQ-client-global-threads-20937207))MessageFlowRecordImpl [nodeID = 3afb4e60-ed20-11e1-831c-109add44c09e,connector = org-hornetq-core-remoting- impl-netty-NettyConnectorFactory?port = 5445 & host = localhost,queueName = sf.config-cluster.3afb4e60-ed20-11e1-831c-109add44c09e,queue = QueueImpl [name = sf.config-cluster.3afb4e60-ed20-11e1- 831c-109add44c09e,postOffice = PostOfficeImpl [server = HornetQServerImpl :: serverUUID = 458fb681-ed23-11e1-8bbf-c42c031d96aa]] @ 192b987,isClosed = false,firstReset = true] ::遠程隊列綁定jms.queue.outputQueue458fb681-ed23- 11e1-8bbf-c42c031 d96aa已經被綁定在郵局。最有可能的原因是由於集羣最大跳數太大或者您有多個集羣連接到使用重疊地址的相同節點,因此您的集羣中有一個環路

18:38:14,395 WARN [org.hornetq。 core.server.cluster.impl。ClusterConnectionImpl](Thread-4(HornetQ-client-global-threads-20937207))MessageFlowRecordImpl [nodeID = 3afb4e60-ed20-11e1-831c-109add44c09e,connector = org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port = 5445 & host = localhost,queueName = sf.config-cluster.3afb4e60-ed20-11e1-831c-109add44c09e,queue = QueueImpl [name = sf.config-cluster.3afb4e60-ed20-11e1-831c-109add44c09e,postOffice = PostOfficeImpl [ server = HornetQServerImpl :: serverUUID = 458fb681-ed23-11e1-8bbf-c42c031d96aa]] @ 192b987,isClosed = false,firstReset = true] ::遠程隊列綁定jms.queue.expiryQueue458fb681-ed23-11e1-8bbf-c42c031d96aa已經在郵局約束。最有可能的原因是由於羣集最大跳數太大或者您有多個羣集連接到使用重疊地址的相同節點,導致羣集中存在環路

12:11:35,018 INFO [org.hornetq。 core.server.cluster.impl.BridgeImpl](Thread-20(HornetQ-server-HornetQServerImpl :: serverUUID = 9287734d-eced-11e1-b554-c42c031d96aa-11515472))Bridge ClusterConnectionBridge @ 17f9401 [name = sf.config-cluster。 ffb4ee03-ecec-11e1-86b2-109add44c09e,queue = QueueImpl [name = sf.config-cluster.ffb4ee03-ecec-11e1-86b2-109add44c09e,postOffice = PostOfficeImpl [server = HornetQServerImpl :: serverUUID = 9287734d-eced-11e1-b554 @cdc171c9e1,c = c2c031d96aa]] @ cdd17f targetConnector = ServerLocatorImpl(identity =(Cluster-connection-bridge :: ClusterConnectionBridge @ 17f9401 [name = sf.config-cluster.ffb4ee03-ecec-11e1-86b2-109add44c09e,queue = QueueImpl [name = sf。配置-cluster.ffb4ee03-ECEC-11e1-86b2 -109add44c09e,postOffice = PostOfficeImpl [server = HornetQServerImpl :: serverUUID = 9287734d-eced-11e1-b554-c42c031d96aa]] @ cdd17f targetConnector = ServerLocatorImpl [initialConnectors = [org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port = 5445 & host = localhost],discoveryGroupConfiguration = null]] :: ClusterConnectionImpl @ 20566889 [nodeUUID = 9287734d-eced-11e1-b554-c42c031d96aa,connector = org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port = 5445 & host = localhost,address = jms,server = HornetQServerImpl :: serverUUID = 9287734d-eced-11e1-b554-c42c031d96aa]))[initialConnectors = [org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port = 5445 & host = localhost],discoveryGroupConfiguration = null]]連接

12:11:32,673信息[org.hornetq.core.server.cluster.impl.Bridg eImpl](Thread-3(HornetQ-server-HornetQServerImpl :: serverUUID = 9287734d-eced-11e1-b554-c42c031d96aa-11515472))Bridge ClusterConnectionBridge @ 147e4f0 [name = sf.config-cluster.2ab34008-eced-11e1-ad90- 109add5d2b6e,queue = QueueImpl [name = sf.config-cluster.2ab34008-eced-11e1-ad90-109add5d2b6e,postOffice = PostOfficeImpl [server = HornetQServerImpl :: serverUUID = 9287734d-eced-11e1-b554-c42c031d96aa]] @ 1074938 targetConnector = ServerLocatorImpl(identity =(Cluster-connection-bridge :: ClusterConnectionBridge @ 147e4f0 [name = sf.config-cluster.2ab34008-eced-11e1-ad90-109add5d2b6e,queue = QueueImpl [name = sf.config-cluster.2ab34008-eced- 11e1-ad90-109add5d2b6e,postOffice = PostOfficeImpl [server = HornetQServerImpl :: serverUUID = 9287734d-eced-11e1-b554-c42c031d96aa]] @ 1074938 targetConnector = ServerLocatorImpl [initialConnectors = [org-hornetq-core-remoting-impl-netty-NettyConnectorFactory ?port = 5445 & host = localhost],discoveryGroupConfiguration = null]] :: ClusterConnectionImpl @ 20566889 [nodeUU ID = 9287734d-eced-11e1-b554-c42c031d96aa,connector = org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port = 5445 & host = localhost,address = jms,server = HornetQServerImpl :: serverUUID = 9287734d-eced -11e1-b554-c42c031d96aa]))[initialConnectors = [ORG-HornetQ的核 - 遠程-IMPL-網狀-NettyConnectorFactory?端口= 5445 &主機=本地主機],discoveryGroupConfiguration =空]]連接

的配置是:

 <hornetq-server> 
      <clustered>true</clustered> 
      <persistence-enabled>true</persistence-enabled> 
      <cluster-user>myconfig</cluster-user> 
      <cluster-password>mycluster</cluster-password> 
      <journal-file-size>102400</journal-file-size> 
      <journal-min-files>2</journal-min-files> 

      <connectors> 
       <netty-connector name="netty" socket-binding="messaging"/> 
       <in-vm-connector name="in-vm" server-id="5"/> 
      </connectors> 

      <acceptors> 
       <netty-acceptor name="netty" socket-binding="messaging"/> 
       <in-vm-acceptor name="in-vm" server-id="5"/> 
      </acceptors> 

      <broadcast-groups> 
       <broadcast-group name="bg-config"> 
        <local-bind-port>9877</local-bind-port> 
        <group-address>224.1.22.1</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-config"> 
        <group-address>224.1.22.1</group-address> 
        <group-port>9876</group-port> 
        <refresh-timeout>10000</refresh-timeout> 
       </discovery-group> 
      </discovery-groups> 

      <cluster-connections> 
       <cluster-connection name="config-cluster"> 
        <address>jms</address> 
        <connector-ref>netty</connector-ref> 
        <forward-when-no-consumers>true</forward-when-no-consumers> 
        <max-hops>1</max-hops> 
        <discovery-group-ref discovery-group-name="dg-config"/> 
       </cluster-connection> 
      </cluster-connections> 

      <security-settings> 
       <security-setting match="#"> 
        <permission type="send" roles="guest"/> 
        <permission type="consume" roles="guest"/> 
        <permission type="createNonDurableQueue" roles="guest"/> 
        <permission type="deleteNonDurableQueue" roles="guest"/> 
       </security-setting> 
      </security-settings> 

      <address-settings> 
       <address-setting match="#"> 
        <dead-letter-address>jms.queue.DLQ</dead-letter-address> 
        <expiry-address>jms.queue.ExpiryQueue</expiry-address> 
        <redelivery-delay>500</redelivery-delay> 
        <max-delivery-attempts>5000</max-delivery-attempts> 
        <max-size-bytes>10485760</max-size-bytes> 
        <address-full-policy>BLOCK</address-full-policy> 
        <message-counter-history-day-limit>10</message-counter-history-day-limit> 
       </address-setting> 
      </address-settings> 

      <jms-connection-factories> 
       <connection-factory name="InVmConnectionFactory"> 
        <connectors> 
         <connector-ref connector-name="in-vm"/> 
        </connectors> 
        <entries> 
         <entry name="java:/ConnectionFactory"/> 
        </entries> 
        <connection-ttl>-1</connection-ttl> 
       </connection-factory> 
       <connection-factory name="RemoteConnectionFactory"> 
        <connectors> 
         <connector-ref connector-name="netty"/> 
        </connectors> 
        <entries> 
         <entry name="RemoteConnectionFactory"/> 
         <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/> 
        </entries> 
        <connection-ttl>-1</connection-ttl> 
       </connection-factory> 
       <pooled-connection-factory name="hornetq-ra"> 
        <transaction mode="xa"/> 
        <connectors> 
         <connector-ref connector-name="in-vm"/> 
        </connectors> 
        <entries> 
         <entry name="java:/JmsXA"/> 
        </entries> 
       </pooled-connection-factory> 
      </jms-connection-factories> 

      <jms-destinations> 
       <jms-queue name="testQueue"> 
        <entry name="queue/test"/> 
        <entry name="java:jboss/exported/jms/queue/test"/> 
       </jms-queue> 
       <jms-queue name="expiryQueue"> 
        <entry name="queue/ExpiryQueue"/> 
        <entry name="java:jboss/exported/jms/queue/ExpiryQueue"/> 
       </jms-queue> 
       <jms-topic name="testTopic"> 
        <entry name="topic/test"/> 
        <entry name="java:jboss/exported/jms/topic/test"/> 
       </jms-topic> 
      </jms-destinations> 
     </hornetq-server> 
    </subsystem> 

回答

3

錯誤指的是網絡中多播的配置。

您可以停止錯誤信息添加上方將hornetq設置的配置:

<cluster-connection name="my-cluster"> 
    <reconnect-attempts>2</reconnect-attempts> 
    ... 
</cluster-connection> 

-1 = infinity (default) 
2 = 2 times 

但我沒有用這個。我改變我的多播地址爲224.0.0.1,而不是默認的231.7.7.7,像這樣:

<socket-binding-group name="full-ha-sockets" default-interface="public"> 
    ... 
    <socket-binding name="messaging-group" port="0" multicast-address="${jboss.messaging.group.address:224.0.0.1}" multicast-port="${jboss.messaging.group.port:9876}"/> 
    ... 
</socket-binding-group> 
+0

所以這個問題有2年,但我希望你仍然會看看它。 @埃爾維斯這工作得很好,但你能解釋我爲什麼嗎? – GoofKyko