我有一个包含 2 个 worker 和 1 个 master 的集群。集群使用 Akka 和 Scala 实现。
当我杀死 worker 并尝试使用以下命令再次运行它时:
java -Xms3500M -Xmx3500M -Dlog_file_name=worker1 "-Dconfig.file=F:\cluster\application.conf" -cp cluster.jar knowmail.Worker worker1 2551
我收到以下错误:
Connection refused Association with remote system [akka.tcp://ClusterSystem@xxxxxx:2552] has failed, address is now gated for [5000] ms. Reason: [As kka.tcp://ClusterSystem@xxxx:2552]] Caused by: [Connection refused: no further information: /xxxx:2552]
集群配置:
remote {
log-remote-lifecycle-events = off
log-received-messages = on
log-sent-messages = on
netty.tcp {
hostname = "xxxxxx"
port = 8888
bind-hostname = 0.0.0.0
bind-port = 8888
}
}
cluster {
seed-nodes = [
"akka.tcp://ClusterSystem@xxxxx:2551",
"akka.tcp://ClusterSystem@xxxxxx:2552"]
auto-down-unreachable-after = 20s
}
http.client.parsing.max-content-length = infinite
}
有没有人遇到这个错误并解决了?
最佳答案
当我在另一个种子节点启动之前启动其中一个种子节点/worker 时,会发生这种情况。
所以一个种子节点正在寻找另一个并报告以下错误:
akka.tcp://ClusterSystem@10.5.2.10:2552] has failed, address is now gated for [5000] ms.
关于scala - akka 集群连接被拒绝 : address is now > gated for [5000] ms,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44746322/