Hi
I am also trying the same example as Vineet is and have been struggling to 
get the system working when the master in terminal 1 (2551) is terminated.

When the master in terminal 1 is terminated,

1. The Master on 2552 has identified itself as the active master

[info] [INFO] [04/09/2016 15:32:58.969] 
[ClusterSystem-akka.actor.default-dispatcher-15] 
[akka.tcp://[email protected]:2552/user/master] Previous oldest 
removed [akka.tcp://[email protected]:2551]
[info] [INFO] [04/09/2016 15:32:58.970] 
[ClusterSystem-akka.actor.default-dispatcher-19] 
[akka.tcp://[email protected]:2552/user/master] Younger observed 
OldestChanged: [None -> myself]
[info] [INFO] [04/09/2016 15:32:58.970] 
[ClusterSystem-akka.actor.default-dispatcher-19] 
[akka.tcp://[email protected]:2552/user/master] Singleton manager 
[akka.tcp://[email protected]:2552] starting singleton actor
[info] [INFO] [04/09/2016 15:32:58.972] 
[ClusterSystem-akka.actor.default-dispatcher-19] 
[akka.tcp://[email protected]:2552/user/master] 
ClusterSingletonManager state change [Younger -> Oldest]

...
[info] [INFO] [04/09/2016 15:32:59.972] 
[ClusterSystem-akka.actor.default-dispatcher-3] 
[akka.tcp://[email protected]:2552/user/masterProxy] Singleton 
identified: akka://ClusterSystem/user/master/active



2. The Frontend has also identified the master on 2552 as active 

[info] [INFO] [04/09/2016 15:32:59.535] 
[ClusterSystem-akka.actor.default-dispatcher-22] 
[akka.tcp://[email protected]:3001/user/frontend/masterProxy] 
Singleton identified: 
akka.tcp://[email protected]:2552/user/master/active


3. The worker has also connected with the receptionist on 2552

[info] [INFO] [04/09/2016 15:38:19.884] 
[WorkerSystem-akka.actor.default-dispatcher-4] 
[akka.tcp://[email protected]:37704/user/clusterClient] Connected to 
[akka.tcp://[email protected]:2552/user/receptionist]


But when the Frontend sends work to the master, it gets a 
AskTimeoutException, leading to the work not getting accepted.

[error] akka.pattern.AskTimeoutException: Ask timed out on 
[Actor[akka://ClusterSystem/user/frontend/masterProxy#-550380601]] after 
[15000 ms]
[info] [INFO] [04/09/2016 15:38:06.501] 
[ClusterSystem-akka.actor.default-dispatcher-20] 
[akka://ClusterSystem/user/frontend] Failure: 
*akka.pattern.AskTimeoutException: 
Ask timed out on 
[Actor[akka://ClusterSystem/user/frontend/masterProxy#-550380601]]* after 
[15000 ms]
[error] at 
akka.pattern.PromiseActorRef$$anonfun$1.apply$mcV$sp(AskSupport.scala:335)
[error] at akka.actor.Scheduler$$anon$7.run(Scheduler.scala:117)
[error] at 
scala.concurrent.Future$InternalCallbackExecutor$.scala$concurrent$Future$InternalCallbackExecutor$$unbatchedExecute(Future.scala:694)
[error] at 
scala.concurrent.Future$InternalCallbackExecutor$.execute(Future.scala:691)
[info] [INFO] [04/09/2016 15:38:06.501] 
[ClusterSystem-akka.actor.default-dispatcher-20] 
[akka://ClusterSystem/user/frontend] akka.pattern.AskTimeoutException: Ask 
timed out on 
[Actor[akka://ClusterSystem/user/frontend/masterProxy#-550380601]] after 
[15000 ms]
[error] at 
akka.actor.LightArrayRevolverScheduler$TaskHolder.executeTask(Scheduler.scala:467)
[error] at 
akka.actor.LightArrayRevolverScheduler$$anon$8.executeBucket$1(Scheduler.scala:419)
[info] [INFO] [04/09/2016 15:38:06.502] 
[ClusterSystem-akka.actor.default-dispatcher-20] 
[akka://ClusterSystem/user/producer] *Work not accepted, retry after a 
while*
[error] at 
akka.actor.LightArrayRevolverScheduler$$anon$8.nextTick(Scheduler.scala:423)
[error] at 
akka.actor.LightArrayRevolverScheduler$$anon$8.run(Scheduler.scala:375)
[error] at java.lang.Thread.run(Thread.java:745)


Any pointers on how to overcome this error will be greatly appreciated. I 
have tried this with 2.3.9 as well as 2.4.2, both exhibit the same behavior.

Thanks,
Atul


On Friday, 10 April 2015 14:44:56 UTC+5:30, Akka Team wrote:
>
> Hi,
>
> It seems like that template was not upgraded to Akka 2.3.9 and we fixed 
> quite a few bugs recently. You should try to set the Akka dependency in 
> your project created from the template to 2.3.9 and try it again. 
>
> -Endre
>
> On Thu, Apr 9, 2015 at 12:37 AM, Vineet Goel <[email protected] 
> <javascript:>> wrote:
>
>> Hi,
>>
>> I am trying to learn the Akka singleton pattern and was looking at the 
>> distributed worker tutorial given here: 
>> http://typesafe.com/activator/template/akka-distributed-workers . I am 
>> trying to play with the scenario where I start 2 masters(backend) nodes as 
>> different processes. I start them on port 2551 and 2552. 2551 being the 
>> oldest is the singleton master and 2552 is a standby.
>>
>> Now according to the tutorial:
>>
>> "In case of failure of the master node another master actor is 
>> automatically started on a standby node. The master on the standby node 
>> takes over the responsibility for outstanding work."
>>
>> However when I kill the master running on port 2551, the standby master 
>> on 2552 doesn't promote itself to master and I keep getting the following 
>> error in the logs:
>>
>> [WARN] [04/08/2015 15:28:11.665] 
>> [ClusterSystem-akka.remote.default-remote-dispatcher-18] [akka.tcp://
>> [email protected]:2552/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2FClusterSystem%40127.0.0.1%3A2551-3/endpointWriter]
>>  
>> AssociationError [akka.tcp://[email protected]:2552] -> 
>> [akka.tcp://[email protected]:2551]: Error [Invalid address: 
>> akka.tcp://[email protected]:2551] [
>>
>> akka.remote.InvalidAssociation: Invalid address: akka.tcp://
>> [email protected]:2551
>>
>> Caused by: akka.remote.transport.Transport$InvalidAssociationException: 
>> Connection refused: /127.0.0.1:2551
>>
>> I have no idea what is happening here. Any help in how to use the 
>> singleton pattern to handle the behavior that the tutorial claims would be 
>> highly appreciated. Thanks.
>>
>> -Vineet
>>
>> -- 
>> >>>>>>>>>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Akka Team
> Typesafe - Reactive apps on the JVM
> Blog: letitcrash.com
> Twitter: @akkateam
>

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

Reply via email to