WARN:网络上有多个服务器在广播相同的节点ID

问题描述 投票:0回答:1

我有一个由三个ActiveMQ代理组成的群集,它们在不同的计算机上运行。现在,我看到一则警告反复说明以下

2020-06-17 10:40:07,378 WARN  [org.apache.activemq.artemis.core.client] AMQ212034: There are more than one servers on the network broadcasting the same node id. You will see this message exactly once (per node) if a node is restarted, in which case it can be safely ignored. But if it is logged continuously it means you really do have more than one node on the same network active concurrently with the same node id. This could occur if you have a backup node active at the same time as its live node. nodeID=03451127-a9c9-11ea-992a-005056ad92be

这是broker.xml中主节点的配置代码段

<connectors>
   <connector name="nettyartemis">tcp://10.5.100.1:61616</connector>
</connectors>

<discovery-groups>
   <discovery-group name="my-discovery-group">
      <local-bind-address>10.5.100.1</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>

<cluster-connections>
         <cluster-connection name="my-cluster">
            <connector-ref>nettyartemis</connector-ref>
            <retry-interval>500</retry-interval>
            <use-duplicate-detection>true</use-duplicate-detection>
            <message-load-balancing>STRICT</message-load-balancing>
            <max-hops>1</max-hops>
            <discovery-group-ref discovery-group-name="my-discovery-group"/>
         </cluster-connection>
      </cluster-connections>


<broadcast-groups>
   <broadcast-group name="my-broadcast-group">
      <local-bind-address>10.5.100.1</local-bind-address>
      <local-bind-port>5432</local-bind-port>
      <group-address>231.7.7.7</group-address>
      <group-port>9876</group-port>
      <broadcast-period>2000</broadcast-period>
      <connector-ref>nettyartemis</connector-ref>
   </broadcast-group>
</broadcast-groups>


<ha-policy>
   <replication>
      <master/>
   </replication>
</ha-policy>

以下是broekr.xml中一个从属节点的配置摘要

<connectors>
   <connector name="nettyartemistwo">tcp://10.5.100.2:61616</connector>
</connectors>

<discovery-groups>
   <discovery-group name="my-discovery-group">
      <local-bind-address>10.5.100.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>

<cluster-connections>
         <cluster-connection name="my-cluster">
            <connector-ref>nettyartemistwo</connector-ref>
            <retry-interval>500</retry-interval>
            <use-duplicate-detection>true</use-duplicate-detection>
            <message-load-balancing>STRICT</message-load-balancing>
            <max-hops>1</max-hops>
            <discovery-group-ref discovery-group-name="my-discovery-group"/>
         </cluster-connection>
      </cluster-connections>

<broadcast-groups>
   <broadcast-group name="my-broadcast-group">
      <local-bind-address>10.5.100.2</local-bind-address>
      <local-bind-port>5432</local-bind-port>
      <group-address>231.7.7.7</group-address>
      <group-port>9876</group-port>
      <broadcast-period>2000</broadcast-period>
      <connector-ref>nettyartemistwo</connector-ref>
   </broadcast-group>
</broadcast-groups>

<ha-policy>
   <replication>
      <slave/>
   </replication>
</ha-policy>

关于为什么收到此警告的任何想法建议?

jms activemq-artemis
1个回答
0
投票

首次启动代理实例时,它将初始化其日记。代理在此初始化阶段所做的一件事就是生成一个UUID,该UUID将用于唯一地标识代理(例如集群)。这称为“节点ID”。

[通常,当用户看到There are more than one servers on the network broadcasting the same node id时,表明他们已将一个经纪人的日记复制到另一个经纪人。由于日志包含唯一的“节点ID”,因此两个代理最终都使用相同的ID。

这种情况下的解决方案是从记录此消息的一个代理中删除日志(默认情况下存储在data目录中)。代理重新启动后,日志将重新初始化,并创建一个新的节点ID。

© www.soinside.com 2019 - 2024. All rights reserved.