This is a follow-up 
to: 
https://groups.google.com/forum/#!searchin/akka-user/cluster/akka-user/Z-SGJOpeWZI/kdHAkfBvBQAJ

To recap, I'm following the typesafe activator sample for clustering pretty 
closely with a ClusterSingletonManager, ClusterSingletonProxy, 
ClusterClient, ClusterReceptionist and DistributedPubSubMediator.  The 
Master is effectively running on one box, and registration messages from 
Workers to the Master via ClusterSystemProxy -> ClusterReceptionist are 
being received by the master.  However, messages from the master to the 
workers are only succeeding for workers on the same machine as the master.

I am still somewhat confused, after trying to read available stuff on actor 
addressing, why the worker and cluster client are being instantiated with 
addresses like akka://ClusterSystem/user/clusterClient#-110142431 instead 
of akka.tcp://ClusterSystem@XXXX:1234/user/clusterClient, and not sure 
whether this might be the issue.


Here is the output for the MasterWorkerProtocol.RegisterWorker receive 
action:

Local (same box as Master) - message from master are received here
WorkerId 55d45a8c-3f7c-4f8f-871c-b6434fb8b1d8 registered for 
Actor[akka://ClusterSystem/system/receptionist/akka://WorkerSystem/user/worker#807360766#1585050875]


Remote (where 1234 is the ClusterSystem port) - messages from master are 
not received
WorkerId 97411fe9-41e3-416c-9dd2-c483d876c9bf registered for 
Actor[akka://ClusterSystem/system/receptionist/akka.tcp://[email protected]:1234/user/worker#-858415934#-416425975]


We need to dynamically determine IP addresses on system startup, so I'm 
calling Cluster(clusterSystem).joinSeedNodes(hosts()) just before starting 
up the cluster and worker

def startBackend(): Unit = {
  val settings = ClusterSingletonManagerSettings(clusterSystem)
  clusterSystem.actorOf(ClusterSingletonManager.props(masterProps, PoisonPill, 
settings), "master")
}


def startWorker(ip: String): Unit = {
var contacts = initialContacts(Some(workerConf))
val clusterClient = clusterSystem.actorOf(
ClusterClient.props(ClusterClientSettings(clusterSystem)
.withInitialContacts(contacts)),
"clusterClient")
workerSystem.actorOf(Worker.props(clusterClient, workExecutorProps), 
"worker")
}


def startSystem() = {
  Cluster(clusterSystem).joinSeedNodes(hosts())
  startBackend()
  startWorker(myIp)
}


Here are the startup logs:

Slave, IP = X.X.X.X
Master, IP = Y.Y.Y.Y
Cluster Actor System Port:  1234
Worker Actor System Port: 5678

Slave:

2015-09-29_19:27:02.47610 INFO  - Remoting started; listening on addresses 
:[akka.tcp://[email protected]:1234]
2015-09-29_19:27:02.47937 INFO  - Remoting now listens on addresses: 
[akka.tcp://[email protected]:1234]
2015-09-29_19:27:02.59784 INFO  - Cluster Node 
[akka.tcp://[email protected]:1234] - Starting up...
2015-09-29_19:27:04.06677 INFO  - Cluster Node 
[akka.tcp://[email protected]:1234] - Registered cluster JMX MBean 
[akka:type=Cluster]
2015-09-29_19:27:04.06810 INFO  - Cluster Node 
[akka.tcp://[email protected]:1234] - Started up successfully
2015-09-29_19:27:04.40905 INFO  - Cluster Node 
[akka.tcp://[email protected]:1234] - Metrics collection has started 
successfully
2015-09-29_19:27:04.59004 INFO  - Cluster Node 
[akka.tcp://[email protected]:1234] - No seed-nodes configured, manual 
cluster join required
2015-09-29_19:27:05.54675 INFO  - Starting remoting
2015-09-29_19:27:05.91876 INFO  - Remoting started; listening on addresses 
:[akka.tcp://[email protected]:12489]
2015-09-29_19:27:05.91918 INFO  - Remoting now listens on addresses: 
[akka.tcp://[email protected]:12489]
2015-09-29_19:27:11.18977 INFO  - Connected to 
[akka.tcp://[email protected]:1234/system/receptionist]
2015-09-29_19:27:13.43786 INFO  - Cluster Node 
[akka.tcp://[email protected]:1234] - Welcome from 
[akka.tcp://[email protected]:1234]
2015-09-29_19:27:13.66455 INFO  - ClusterSingletonManager state change 
[Start -> Younger]


Master:

2015-09-29_19:26:58.94025 INFO  - Starting remoting
2015-09-29_19:27:01.72502 INFO  - Remoting started; listening on addresses 
:[akka.tcp://[email protected]:1234]
2015-09-29_19:27:01.73541 INFO  - Remoting now listens on addresses: 
[akka.tcp://[email protected]:1234]
2015-09-29_19:27:02.09211 INFO  - Cluster Node 
[akka.tcp://[email protected]:1234] - Starting up...
2015-09-29_19:27:03.18036 INFO  - Cluster Node 
[akka.tcp://[email protected]:1234] - Registered cluster JMX MBean 
[akka:type=Cluster]
2015-09-29_19:27:03.18138 INFO  - Cluster Node 
[akka.tcp://[email protected]:1234] - Started up successfully
2015-09-29_19:27:03.29329 INFO  - Cluster Node 
[akka.tcp://[email protected]:1234] - Metrics collection has started 
successfully
2015-09-29_19:27:03.49712 INFO  - Cluster Node 
[akka.tcp://[email protected]:1234] - No seed-nodes configured, manual 
cluster join required
2015-09-29_19:27:04.60802 INFO  - Remoting started; listening on addresses 
:[akka.tcp://[email protected]:5678]
2015-09-29_19:27:04.61257 INFO  - Remoting now listens on addresses: 
[akka.tcp://[email protected]:5678]
2015-09-29_19:27:07.97462 INFO  - Cluster Node 
[akka.tcp://[email protected]:1234] - Node 
[akka.tcp://[email protected]:1234] is JOINING, roles []
2015-09-29_19:27:08.03272 INFO  - Message 
[akka.cluster.InternalClusterAction$InitJoinNack] from 
Actor[akka.tcp://[email protected]:1234/system/cluster/core/daemon#973051367]
 
to 
Actor[akka://ClusterSystem/system/cluster/core/daemon/firstSeedNodeProcess-1#-966591385]
 
was not delivered. [1] dead letters encountered. This logging can be turned 
off or adjusted with configuration settings 'akka.log-dead-letters' and 
'akka.log-dead-letters-during-shutdown'.
2015-09-29_19:27:08.03760 INFO  - Message 
[akka.cluster.InternalClusterAction$InitJoinNack] from 
Actor[akka.tcp://[email protected]:1234/system/cluster/core/daemon#973051367]
 
to 
Actor[akka://ClusterSystem/system/cluster/core/daemon/firstSeedNodeProcess-1#-966591385]
 
was not delivered. [2] dead letters encountered. This logging can be turned 
off or adjusted with configuration settings 'akka.log-dead-letters' and 
'akka.log-dead-letters-during-shutdown'.
2015-09-29_19:27:08.04058 INFO  - Message 
[akka.cluster.InternalClusterAction$InitJoinNack] from 
Actor[akka.tcp://[email protected]:1234/system/cluster/core/daemon#973051367]
 
to 
Actor[akka://ClusterSystem/system/cluster/core/daemon/firstSeedNodeProcess-1#-966591385]
 
was not delivered. [3] dead letters encountered. This logging can be turned 
off or adjusted with configuration settings 'akka.log-dead-letters' and 
'akka.log-dead-letters-during-shutdown'.
2015-09-29_19:27:08.06898 INFO  - Message 
[akka.cluster.InternalClusterAction$InitJoinNack] from 
Actor[akka.tcp://[email protected]:1234/system/cluster/core/daemon#973051367]
 
to 
Actor[akka://ClusterSystem/system/cluster/core/daemon/firstSeedNodeProcess-1#-966591385]
 
was not delivered. [4] dead letters encountered. This logging can be turned 
off or adjusted with configuration settings 'akka.log-dead-letters' and 
'akka.log-dead-letters-during-shutdown'.
2015-09-29_19:27:08.46811 INFO  - Cluster Node 
[akka.tcp://[email protected]:1234] - Leader is moving node 
[akka.tcp://[email protected]:1234] to [Up]
2015-09-29_19:27:08.61308 INFO  - Singleton manager starting singleton 
actor [akka://ClusterSystem/user/master/singleton]
2015-09-29_19:27:08.61387 INFO  - ClusterSingletonManager state change 
[Start -> Oldest]
2015-09-29_19:27:08.61786 INFO  - Cluster Node 
[akka.tcp://[email protected]:1234] - Trying to join 
[akka.tcp://[email protected]:1234] when already part of a cluster, 
ignoring
2015-09-29_19:27:10.03418 INFO  - Connected to 
[akka://ClusterSystem/system/receptionist]
2015-09-29_19:27:10.04011 INFO  - WorkerId 
55d45a8c-3f7c-4f8f-871c-b6434fb8b1d8 registered for 
Actor[akka://ClusterSystem/system/receptionist/akka://WorkerSystem/user/worker#807360766#1585050875]
2015-09-29_19:27:11.25333 INFO  - WorkerId 
97411fe9-41e3-416c-9dd2-c483d876c9bf registered for 
Actor[akka://ClusterSystem/system/receptionist/akka.tcp://[email protected]:1234/user/worker#-858415934#-416425975]
2015-09-29_19:27:12.91486 INFO  - Cluster Node 
[akka.tcp://[email protected]:1234] - Node 
[akka.tcp://[email protected]:1234] is JOINING, roles []
2015-09-29_19:27:13.46843 INFO  - Cluster Node 
[akka.tcp://[email protected]:1234] - Leader is moving node 
[akka.tcp://[email protected]:1234] to [Up]


Thanks for looking!

-- 
>>>>>>>>>>      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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to