关于scala:akka群集连接被拒绝:地址现在>门控[5000] ms

akka cluster Connection refused: address is now > gated for [5000] ms

我有一个集群,其中有2名工人和1名主人。 该集群由Akka和Scala实现。

当我杀死该工人并尝试使用以下命令再次运行它时:

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]

集群的配置:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  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
}

有人遇到此错误并解决了吗?


当我在另一个种子节点启动之前启动一个种子节点/工作者时,就会发生这种情况。

因此,一个种子节点正在寻找另一个种子节点,并报告以下错误:

akka.tcp://[email protected]:2552] has failed, address is now
gated for [5000] ms.