akka cluster connection refused

662 views
Skip to first unread message

Johan Dindaine

unread,
May 28, 2014, 12:03:47 PM5/28/14
to akka...@googlegroups.com
Hi,

I'm trying to connect two nodes together using akka-cluster and even if I thought they were setup correctly, while trying to launch the application I ran into connection problems.

[info] [WARN] [05/28/2014 16:50:09.017] [ClusterSystem-akka.remote.default-remote-dispatcher-66] [Remoting] Tried to associate with unreachable remote address [akka.tcp://Cluste...@10.xxx.xxx.xxx:15672].  Address is now gated for 5000 ms, all messages to this address will be delivered to dead letters. Reason: Connection refused: /10.xxx.xxx.xxx:15672

I have got two nodes and they are configured to talk to each other despite the connection problem:

On node A:

akka {

  actor {

    provider = "akka.cluster.ClusterActorRefProvider"

  }

  remote {

    [*]

    netty.tcp {

      hostname = "10.yyy.yyy.yyy"

      port = 15699

    }

  }


  cluster {

    seed-nodes = ["akka.tcp://Cluste...@10.xxx.xxx.xxx:15672"]

  }

}


And on node B

akka {

  actor {

    provider = "akka.cluster.ClusterActorRefProvider"

  }

  remote {

    [*]

    netty.tcp {

      hostname = "10.xxx.xxx.xxx"

      port = 15672

    }

  }


  cluster {

    seed-nodes = ["akka.tcp://Cluste...@10.yyy.yyy.yyy: 15699"]

  }

}

Martynas Mickevičius

unread,
May 29, 2014, 3:12:38 AM5/29/14
to akka...@googlegroups.com
You have seed-nodes setting pointing to other node in the cluster. So naturally when you first start either node it tries to connect to the other one which has not been started yet. Thus the log message: Reason: Connection refused: /10.xxx.xxx.xxx:15672

You can choose which node you want to start first and have its own address in the seed-node list. This way the first node will start the cluster with itself.

Then when you start the second node, it will try to connect to the first one and will successfully join the cluster.


--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.



--
Martynas Mickevičius
TypesafeReactive Apps on the JVM

Johan Dindaine

unread,
Jun 2, 2014, 4:33:34 AM6/2/14
to akka...@googlegroups.com
I was clearly miss-configured.
I tried it again from the akka-sample-cluster-java activator template and this has worked so I modified my configuration based on the word count example.
And now things work.

Thanks
Reply all
Reply to author
Forward
0 new messages