3
votes

I have a cluster with 2 workers and 1 master. the cluster is implemented with Akka and Scala.

When i killed the worker and try to run it again with the following command:

java -Xms3500M -Xmx3500M -Dlog_file_name=worker1 "-Dconfig.file=F:\cluster\application.conf" -cp cluster.jar knowmail.Worker worker1 2551

I get the following error:

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]

a configuration of cluster:

  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
}

Did anyone encountered this error and solved it?

1
are you running any firewall software on this machine? could you check if these ports are open? - Pavel
no firewall ... - Tal Avissar
Could you add your config file? - thwiegan
So you are running your nodes on .6:2551, .8:8888 and .10:2552? - thwiegan

1 Answers

2
votes

This happens when I start one of the seed nodes/workers before the other seed node has been started.

So one seed node is looking for the other and reports the following error of:

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