节点不会重新连接到种子

Nodes won't reconnect to seed

我们在不同的 AWS 数据中心有三个节点,其中一个是唯一的种子节点和单例的独占拥有者,通过在单例代理设置上使用 .withDataCenter 来实现。我们可以通过启动种子节点然后启动其他节点来让我们的集群按设计工作,但如果任何节点出现故障,让它们再次通话的唯一方法似乎是以相同的方式重启整个集群。我们想让它们尝试重新连接到种子节点并在它们可以时恢复正常运行。

当我关闭一个非种子节点时,种子节点将其标记为无法访问并开始定期记录以下内容:

Association with remote system [akka.tcp://application@xxx.xx.x.xxx:xxxx] has failed, address is now gated for [5000] ms. Reason: [Association failed with [akka.tcp://application@xxx.xx.x.xxx:xxxx]] Caused by: [connection timed out: /xxx.xx.x.xxx:xxxx]

很公平。但是,当我重新启动节点时,新启动的节点开始重复:

2018-01-29 22:59:09,587 [DEBUG]: akka.cluster.ClusterCoreDaemon in application-akka.actor.default-dispatcher-18 - now supervising Actor[akka://application/system/cluster/core/daemon/joinSeedNodeProcess-16#-1572745962]

2018-01-29 22:59:09,587 [DEBUG]: akka.cluster.JoinSeedNodeProcess in application-akka.actor.default-dispatcher-3 - started (akka.cluster.JoinSeedNodeProcess@2ae57537)

2018-01-29 22:59:09,755 [DEBUG]: akka.cluster.JoinSeedNodeProcess in application-akka.actor.default-dispatcher-2 - stopped

种子节点日志:

2018-01-29 22:56:25,442 [INFO ]: a.c.Cluster(akka://application) in application-akka.actor.default-dispatcher-4 - Cluster Node [akka.tcp://application@52.xx.xxx.xx:xxxx] dc [asia] - New incarnation of existing member [Member(address = akka.tcp://application@172.xx.x.xxx:xxxx, dataCenter = indonesia, status = Up)] is trying to join. Existing will be removed from the cluster and then new member will be allowed to join.

2018-01-29 22:56:25,443 [INFO ]: a.c.Cluster(akka://application) in application-akka.actor.default-dispatcher-18 - Cluster Node [akka.tcp://application@52.xx.xxx.xx:xxxx] dc [asia] - Marking unreachable node [akka.tcp://application@172.xx.x.xxx:xxxx] as [Down]

此后重复:

2018-01-29 22:57:41,659 [INFO ]: a.c.Cluster(akka://application) in application-akka.actor.default-dispatcher-18 - Cluster Node [akka.tcp://application@52.xx.xxx.xx:xxxx] dc [asia] - Sending InitJoinAck message from node [akka.tcp://application@52.xx.xxx.xx:xxxx] to [Actor[akka.tcp://application@172.xx.x.xxx:xxxx/system/cluster/core/daemon/joinSeedNodeProcess-8#-1322646338]]

2018-01-29 22:57:41,827 [INFO ]: a.c.Cluster(akka://application) in application-akka.actor.default-dispatcher-18 - Cluster Node [akka.tcp://application@52.xx.xxx.xx:xxxx] dc [asia] - New incarnation of existing member [Member(address = akka.tcp://application@172.xx.x.xxx:xxxx, dataCenter = indonesia, status = Down)] is trying to join. Existing will be removed from the cluster and then new member will be allowed to join.

令我感到奇怪的是,日志显示发生的事情 "will" 没有发生,现有的被删除,新成员被允许加入。我一直在谷歌上搜索该消息,但找不到关于我可能需要做些什么才能真正实现的解释。

假设您在 Akka.NET,看起来您可能遇到了 open issue,其中领导者不断尝试移除旧的化身以让新的化身化身加入。问题单中有一些关于放宽 heartbeat-interval 的故障排除建议,或许可以让您深入了解可能的原因。

鉴于跨多个地理位置分散的数据中心的延迟通常较高,我会仔细研究的领域是 failure detection

这似乎与报告的问题无关,但根据您显示的日志,不同数据中心的两个节点之间似乎存在时间差异。