Akka Cluster Not Joining Seed Nodes By Default

Hello,I downloaded the sample app from https://github.com/akka/akka-samples/tree/2.5/akka-sample-cluster-scala . i can run this sample without a problem because it inserts each port 2551 , 2552 into the configuration on the actor system.

But when i remove these ports and run the app. It fails with the error
Remote connection to [null] failed with java.net.ConnectException: Connection refused: /127.0.0.1:2552
and
Remote connection to [null] failed with java.net.ConnectException: Connection refused: /127.0.0.1:2551

Why does this have to fail ? what is the correct way to start the server with seed nodes from application.conf . I have attached the screenshot

I’m not sure I understand your question, but let me try to answer some pieces and you can followup if you can rephrase your question.

The reason that you are passing in ports is that you have to pick which port that node is going to listen on. In a real world system, you would probably be running each node on a different server so they could all listen on the same port. But in this little demo you are running on the same machine, and therefore the same IP, and therefore you have to manually specify a port somehow.

Also, the reason you are getting the “remote connection to [null] failed with connection refused” is because since you didn’t start a node on 2551 and 2551, so there aren’t any seed nodes listening on those ports.

1 Like

Thank you , that answers my question.