Hi Brian, I’m not sure I understand: what exactly do you mean by “it fails”? The log you provided just says that the system has shut down after the actor was terminated.
Regards, Roland > 12 jan 2015 kl. 11:43 skrev Brian Fowler <[email protected]>: > > Hi, > > Can anyone help with the following in Akka 2.3.8 > > The actor > > class SquarerActor extends Actor with ActorLogging { > override def receive = { > case SquareTask(id, number, _) => { > log.info(s"${Thread.currentThread()} ${id}: ${number}^2 = > ${number*number} for ${sender}") > context.stop(self) > } > case _ => { > log.info(s"unknown message received") > } > } > } > > when created locally from > > class TaskAllocatorActor extends Actor with ActorLogging { > override def receive = { > case task: SquareTask => { > log.info(s"${Thread.currentThread()} received ${task} from ${sender}") > > context.actorOf(Props[SquarerActor],task.id) ! task > } > case _ => { > println("Unknown Task") > } > } > } > > works, but when deployed remotely using > > class TaskAllocatorActor extends Actor with ActorLogging { > override def receive = { > case task: SquareTask => { > log.info(s"${Thread.currentThread()} received ${task} from ${sender}") > > > val actorRef = context.actorOf(Props[SquarerActor] > .withDeploy(Deploy(scope = > RemoteScope(AddressFromURIString("akka.tcp://[email protected]:2553")))), > task.id) > actorRef ! task > } > case _ => { > println("Unknown Task") > } > } > } > > the SquarerActor context.stop(self) fails, on the remote system the log is > below, note that the remote actor receives the message and executes the > receive block but the context.stop(self) fails > > [2015-01-12 10:33:47,735] [DEBUG] > LocalActorRefProvider(akka://Example2BoxTwo) - Received command > [DaemonMsgCreate(Props(Deploy(,Config(SimpleConfigObject({})),NoRouter,RemoteScope(akka.tcp://[email protected]:2553),,),class > > com.markit.brianfowler.presentations.akkatotem201501.actors.SquarerActor,Vector()),Deploy(,Config(SimpleConfigObject({})),NoRouter,RemoteScope(akka.tcp://[email protected]:2553),,),akka.tcp://[email protected]:2553/remote/akka.tcp/[email protected]:2552/user/taskAllocatorActor/5#562890728,Actor[akka.tcp://[email protected]:2552/user/taskAllocatorActor#1735676205])] > to RemoteSystemDaemon on [akka://Example2BoxTwo] > [2015-01-12 10:33:47,747] [INFO] SquarerActor - > Thread[Example2BoxTwo-akka.actor.default-dispatcher-21,5,main] 5: 5^2 = 25 > for > Actor[akka.tcp://[email protected]:2552/user/taskAllocatorActor#1735676205] > > [2015-01-12 10:33:47,760] [DEBUG] > LocalActorRefProvider(akka://Example2BoxTwo) - resolve of path sequence > [/remote/akka.tcp/[email protected]:2552/user/taskAllocatorActor/5#562890728] > failed > [2015-01-12 10:33:47,792] [WARN] LocalActorRefProvider(akka://Example2BoxTwo) > - Unknown message > [DeathWatchNotification(Actor[akka.tcp://[email protected]:2552/user/taskAllocatorActor#1735676205],true,false)] > received by [Actor[akka://Example2BoxTwo/remote]] > [2015-01-12 10:33:47,820] [ERROR] akka.remote.EndpointWriter - > AssociationError [akka.tcp://[email protected]:2553] <- > [akka.tcp://[email protected]:2552]: Error [Shut > down address: akka.tcp://[email protected]:2552] > [ akka.remote.ShutDownAssociation: Shut down address: > akka.tcp://[email protected]:2552 Caused by: > akka.remote.transport.Transport$InvalidAssociationException: The remote > system terminated the association because it is shutting down. ] > [2015-01-12 10:33:47,820] [ERROR] akka.remote.EndpointWriter - > AssociationError [akka.tcp://[email protected]:2553] <- > [akka.tcp://[email protected]:2552]: Error [Shut > down address: akka.tcp://[email protected]:2552] > [ akka.remote.ShutDownAssociation: Shut down address: > akka.tcp://[email protected]:2552 Caused by: > akka.remote.transport.Transport$InvalidAssociationException: The remote > system terminated the association because it is shutting down. ] > > Thanks, > > Brian > > > -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ <http://akka.io/docs/> > >>>>>>>>>> Check the FAQ: > >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html > >>>>>>>>>> <http://doc.akka.io/docs/akka/current/additional/faq.html> > >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user > >>>>>>>>>> <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] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at http://groups.google.com/group/akka-user > <http://groups.google.com/group/akka-user>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. Dr. Roland Kuhn Akka Tech Lead Typesafe <http://typesafe.com/> – Reactive apps on the JVM. twitter: @rolandkuhn <http://twitter.com/#!/rolandkuhn> -- >>>>>>>>>> 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.
