Trying to join member with wrong ActorSystem name, but was ignored, expected [X] but was [Y]

573 views
Skip to first unread message

Eric Pederson

unread,
Apr 6, 2014, 11:25:42 AM4/6/14
to akka...@googlegroups.com
Hi guys:

If one of my actor system names is different from the actor system name of the seed nodes I get this message:

WARN: Trying to join member with wrong ActorSystem name, but was ignored, expected [X] but was [Y]

And actually the cluster fails to start up at all.  If I change the actor system name to the same as the seed nodes then everything starts up fine.

Is having the same actor system name required?

This is using Akka 2.3.0. 

Thanks,

Konrad Malawski

unread,
Apr 7, 2014, 10:23:46 AM4/7/14
to akka...@googlegroups.com

Hello Eric,

Is having the same actor system name required?

Yes, for a cluster to converge the cluster members should have the same actorsystem-name.

I like to think of it as: the ActorSystem being the “universe” in which Actors live, the cluster just allows them to live on different “planets” (nodes) (in that abstract universe).
When you look at an actor path it also helps to reason about it - “more left == more general”. So in akka.tcp://Cluster...@127.0.0.1:2552/system/cluster/core/daemon,
the things that have to equal for a Cluster to be able to join another ActorSystem are both the protocol used as well as the actorsystem-name; The host, port, and rest of the path can (and will) differ between nodes.

Relevant lines are: https://github.com/akka/akka/blob/master/akka-cluster/src/main/scala/akka/cluster/ClusterDaemon.scala#L392-L397

I noticed we were not very explicit about this requirement in the docs… Will try to make it more explicit!
I hope this helps though!

PS: Do you have an use-case in mind where you might need to join differently named actor systems into the same cluster?

--
Cheers,
Konrad 'ktoso' Malawski
hAkker - Typesafe, Inc

Eric Pederson

unread,
Apr 7, 2014, 2:56:24 PM4/7/14
to akka...@googlegroups.com
Thanks Konrad - 

I have an app that launches cluster members by ssh-ing into each box and running a script.

The launcher app is joining the cluster to simplify the logic of knowing when everything is up.  I had a different actor system name for the launcher because it's a different app.  But it's not a big deal to have it use the same actor system name.

I'm probably going to move away from having the launcher join the cluster because there is a lot of log noise when the launcher app completes and leaves the cluster.  

Ideally you could subscribe to cluster events without actually joining the cluster, from a launching or monitoring perspective.

What I'll probably do is just send an Identify to an actor that should be living after the cluster member starts successfully.  


-- Eric


--
>>>>>>>>>> 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 a topic in the Google Groups "Akka User List" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/akka-user/XFmoSv6FNIs/unsubscribe.
To unsubscribe from this group and all its topics, 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.

Carsten Saathoff

unread,
Apr 8, 2014, 4:28:37 AM4/8/14
to akka...@googlegroups.com
Hi,

Am Montag, 7. April 2014 20:56:24 UTC+2 schrieb Eric Pederson:
I'm probably going to move away from having the launcher join the cluster because there is a lot of log noise when the launcher app completes and leaves the cluster.  

Ideally you could subscribe to cluster events without actually joining the cluster, from a launching or monitoring perspective.


best

Carsten

Eric Pederson

unread,
Apr 8, 2014, 11:10:41 AM4/8/14
to akka...@googlegroups.com
Hi Carsten - yes.  It didn't seem to do what I needed but I may experiment with it later. 

Actually joining the cluster worked exactly how I wanted it except for the noise in the logs after the launcher app quits after the cluster is fully launched.  

I ended up using just plain remoting and Identify/ActorIdentity.

Thanks,


-- Eric


--
Reply all
Reply to author
Forward
0 new messages