min-nr-of-members not working?

85 views
Skip to first unread message

Raymond Roestenburg

unread,
Jun 30, 2016, 8:47:54 AM6/30/16
to Akka User List
(Copy from gitter)

Hey guys, I don’t think 'min-nr-of-members’ in cluster works anymore, I’ve got an example where I would expect the registerOnMemberUp to not get called until two ‘worker’ role nodes are up, but it gets called anyway. Example is here at https://github.com/RayRoestenburg/akka-in-action/tree/master/chapter-cluster.

I you would like to try:

run sbt assembly, start a 'seed' with
java -DPORT=2551 -Dconfig.resource=/seed.conf -jar target/words-node.jar
And a 'master’ with
java -DPORT=2554 -Dconfig.resource=/master.conf -jar target/words-node.jar
Since worker.min-nr-of-members = 2 is set, I would expect the master not to get up, but it does.
(Am I doing something wrong?)

Cheers,
Ray

Patrik Nordwall

unread,
Jul 1, 2016, 2:32:27 AM7/1/16
to akka...@googlegroups.com
I have verified that it works as expected with the akka-sample-cluster-scala.

I think the problem is that you have not defined the same min-nr-of-members in all config files. seed.config only contains seed.min-nr-of-members

/Patrik

--
>>>>>>>>>> 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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.



--

Patrik Nordwall
Akka Tech Lead
Lightbend -  Reactive apps on the JVM
Twitter: @patriknw

Raymond Roestenburg

unread,
Jul 3, 2016, 2:45:25 PM7/3/16
to Akka User List
Thanks Patrik, I'll try that.

Raymond Roestenburg

unread,
Jul 4, 2016, 5:08:48 AM7/4/16
to Akka User List
That does not seem to solve the issue, I'll check out the akka-sample-cluster-scala to see what you're doing differently there..

Patrik Nordwall

unread,
Jul 4, 2016, 5:35:13 AM7/4/16
to Akka User List
The sample doesn't have those settings, but i added them for two roles and I could see from the MemberUp logging that it was working

Raymond Roestenburg

unread,
Jul 4, 2016, 8:45:42 AM7/4/16
to Akka User List
Ok I'll have a look, even if I set all the confs to the same minimum of 2 worker nodes, the master starts up when there are no worker nodes yet.
Reply all
Reply to author
Forward
0 new messages