节点不会重新连接种子

时间:2018-01-30 16:28:40

标签: akka akka-cluster akka-remoting

我们在不同的AWS数据中心有三个节点,其中一个是唯一的种子节点和单身的独占拥有者,通过在单例代理设置上使用.withDataCenter来完成。我们可以通过启动种子节点然后启动其他节点来使我们的集群按设计工作,但是如果任何节点发生故障,那么让它们再次通话的唯一方法就是以相同的方式重新启动整个集群。我们希望尝试重新连接到种子节点并在可能的情况下恢复正常操作。

当我取下非种子节点时,种子节点将其标记为UNREACHABLE并开始定期记录以下内容:

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.

我觉得奇怪的是,日志表示事情"将"发生在那里,现有的被删除,新成员被允许加入。我一直在谷歌上搜索这条信息,无法找到解释我可能需要做些什么来实现这一点。

1 个答案:

答案 0 :(得分:1)

假设您使用的是Akka.NET,看起来您可能会遇到open issue,其中领导者一直试图删除旧的化身让新的化身加入。在发行票中有一些关于放松heartbeat-interval的故障排除建议,可能会提供一些可能的原因。

鉴于多个地理位置分散的数据中心的延迟通常较高,我将密切关注的一个领域是failure detection

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