我在下面提供了我的消息配置。任何人都可以让我知道为什么在集群中出现hornetq循环。在所有实例中,我们在启动服务器之前删除了数据和临时目录。所有服务器都以localhost作为绑定地址启动。
任何人都可以指定我们是否需要保持集群中所有节点的<local-bind-port>
相同。
我们已经使用JBOSS 7.1.1 Final配置了多播集群(HornetQ)。当我们在3个独立的物理服务器中启动3个JBOSS服务器实例时,它会开始使用此消息加载我的日志
18:38:14,325 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&amp; host = localhost],discoveryGroupConfiguration = null]] :: ClusterConnectionImpl @ 30045119 [nodeUUID = 458fb681-ed23-11e1-8bbf-c42c031d96aa,connector = org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port = 5445&amp; host = localhost,address = jms,server = HornetQServerImpl :: serverUUID = 458fb681-ed23-11e1-8bbf-c42c031d96aa]))[initialConnectors = [org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port = 5445&amp; host = localhost],discoveryGroupConfiguration = null]]已连接
18:38:14,388 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&amp; 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已经绑定在邮局。最可能的原因是,由于群集max-hops太大或者使用重叠地址与同一节点有多个群集连接,群集中有一个循环
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&amp; 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-c42c031d96aa已经绑定在邮局。最可能的原因是,由于群集max-hops太大或者使用重叠地址与同一节点有多个群集连接,群集中有一个循环
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&amp; 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已经绑定在邮局。最可能的原因是,由于群集max-hops太大或者使用重叠地址与同一节点有多个群集连接,群集中有一个循环
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-c42c031d96aa]] @ cdd17f targetConnector = ServerLocatorImpl(identity =(Cluster-connection-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-c42c031d96aa]] @ cdd17f targetConnector = ServerLocatorImpl [initialConnectors = [org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port = 5445&amp; host = localhost],discoveryGroupConfiguration = null]] :: Cl usterConnectionImpl @ 20566889 [nodeUUID = 9287734d-eced-11e1-b554-c42c031d96aa,connector = org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port = 5445&amp; host = localhost,address = jms,server = HornetQServerImpl :: serverUUID = 9287734d-eced-11e1-b554-c42c031d96aa]))[initialConnectors = [org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port = 5445&amp; host = localhost],discoveryGroupConfiguration = null]]已连接
12:11:32,673 INFO [org.hornetq.core.server.cluster.impl.BridgeImpl](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&amp; host = localhost],discoveryGroupConfiguration = null]] :: C lusterConnectionImpl @ 20566889 [nodeUUID = 9287734d-eced-11e1-b554-c42c031d96aa,connector = org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port = 5445&amp; host = localhost,address = jms,server = HornetQServerImpl :: serverUUID = 9287734d-eced-11e1-b554-c42c031d96aa]))[initialConnectors = [org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port = 5445&amp; host = localhost],discoveryGroupConfiguration = null]]已连接
配置为:
<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>
答案 0 :(得分: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>