El actor Akka no se volverá a conectar con Actor remoto después de reiniciar

Así que tengo 2 dockeres que ejecutan 2 sistemas akka.

El Contenedor A ejecuta el Sistema A

El Contenedor B ejecuta el Sistema B

Cuando el Sistema A se carga, se conecta al Sistema B con:

Await.result(system.actorSelection(actorPath).resolveOne(new Timeout(RESOLVE_DURATION)), RESOLVE_DURATION) 

todo bien aquí, la connection es un éxito y los sistemas intercambian posts.

Luego reinicio el Contenedor B

 docker restart container-b 

En el Sistema A, agregué un reloj en el Sistema B si terminaba. cuando reinicio el Sistema B, recibo un post de terminación de AKKA en el Sistema A – Todo bien. Luego comienzo un ciclo de reconnection cada 5 segundos y trato de volver a conectarlo al sistema B de nuevo con:

 Await.result(system.actorSelection(actorPath).resolveOne(new Timeout(RESOLVE_DURATION)), RESOLVE_DURATION) 

pero ahora, tengo la exception de ActorNotFound.

  [ERROR] [21/08/2017 08:11:49.851] [exchange-akka.actor.default-dispatcher-14] [akka.remote.EndpointWriter] AssociationError [akka.tcp://system@systemA:2555] -> [akka.tcp://system@systemB:2550]: Error [Shut down address: akka.tcp://system@systemB:2550] [ akka.remote.ShutDownAssociation: Shut down address: akka.tcp://system@systemB:2550 Caused by: akka.remote.transport.Transport$InvalidAssociationException: The remote system terminated the association because it is shutting down. ] [ERROR] [21/08/2017 08:11:54.850] [exchange-akka.actor.default-dispatcher-14] [cmecactors.watchdog.WatchDog] Failed to reconnect to path [akka.tcp://system@systemB:2550/user/MyActor] akka.actor.ActorNotFound: Actor not found for: ActorSelection[Anchor(akka.tcp://system@systemB:2550/), Path(/user/MyActor)] at akka.actor.ActorSelection$$anonfun$resolveOne$1.apply(ActorSelection.scala:65) ~[akka-actor_2.11-2.4.0.jar:na] at akka.actor.ActorSelection$$anonfun$resolveOne$1.apply(ActorSelection.scala:63) ~[akka-actor_2.11-2.4.0.jar:na] at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32) ~[scala-library-2.11.7.jar:na] at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55) ~[akka-actor_2.11-2.4.0.jar:na] at akka.dispatch.BatchingExecutor$Batch.run(BatchingExecutor.scala:73) ~[akka-actor_2.11-2.4.0.jar:na] at akka.dispatch.ExecutionContexts$sameThreadExecutionContext$.unbatchedExecute(Future.scala:74) ~[akka-actor_2.11-2.4.0.jar:na] at akka.dispatch.BatchingExecutor$class.execute(BatchingExecutor.scala:120) ~[akka-actor_2.11-2.4.0.jar:na] at akka.dispatch.ExecutionContexts$sameThreadExecutionContext$.execute(Future.scala:73) ~[akka-actor_2.11-2.4.0.jar:na] at scala.concurrent.impl.CallbackRunnable.executeWithValue(Promise.scala:40) ~[scala-library-2.11.7.jar:na] at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:248) ~[scala-library-2.11.7.jar:na] at akka.pattern.PromiseActorRef.$bang(AskSupport.scala:345) ~[akka-actor_2.11-2.4.0.jar:na] at akka.actor.EmptyLocalActorRef.specialHandle(ActorRef.scala:553) ~[akka-actor_2.11-2.4.0.jar:na] at akka.actor.DeadLetterA ctorRef.specialHandle(ActorRef.scala:589) ~[akka-actor_2.11-2.4.0.jar:na] at akka.actor.DeadLetterActorRef.$bang(ActorRef.scala:579) ~[akka-actor_2.11-2.4.0.jar:na] at akka.remote.RemoteActorRefProvider$RemoteDeadLetterActorRef.$bang(RemoteActorRefProvider.scala:85) ~[akka-remote_2.11-2.4.0.jar:na] at akka.remote.EndpointManager$$anonfun$2.applyOrElse(Remoting.scala:614) ~[akka-remote_2.11-2.4.0.jar:na] at akka.actor.Actor$class.aroundReceive(Actor.scala:480) ~[akka-actor_2.11-2.4.0.jar:na] at akka.remote.EndpointManager.aroundReceive(Remoting.scala:400) ~[akka-remote_2.11-2.4.0.jar:na] at akka.actor.ActorCell.receiveMessage(ActorCell.scala:525) [akka-actor_2.11-2.4.0.jar:na] at akka.actor.ActorCell.invoke(ActorCell.scala:494) [akka-actor_2.11-2.4.0.jar:na] at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257) [akka-actor_2.11-2.4.0.jar:na] at akka.dispatch.Mailbox.run(Mailbox.scala:224) [akka-actor_2.11-2.4.0.jar:na] at akka.dispatch.Mailbox.exec(Mailbox.scala:234) [akka-actor_2.11-2.4.0.jar:na] at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) [scala-library-2.11.7.jar:na] at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) [scala-library-2.11.7.jar:na] at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) [scala-library-2.11.7.jar:na] at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) [scala-library-2.11.7.jar:na] 

the actorPath en las primeras conexiones es el mismo path cuando bash volver a conectarme.

Solo cuando reinicio el sistema A (reiniciando el contenedor A), la connection es exitosa al igual que al principio.

Versiones:

java 8

versión akka: 2.4.0

docker

 Client: Version: 17.03.1-ce API version: 1.27 Go version: go1.7.5 Git commit: c6d412e Built: Mon Mar 27 17:07:28 2017 OS/Arch: linux/amd64 Server: Version: 17.03.1-ce API version: 1.27 (minimum version 1.12) Go version: go1.7.5 Git commit: c6d412e Built: Mon Mar 27 17:07:28 2017 OS/Arch: linux/amd64 Experimental: false 

EDITAR: estoy ejecutando un control remoto simple, no un clúster Akka + Esta es mi conf:

 akka { provider = "akka.remote.RemoteActorRefProvider" remote { transport = "akka.remote.netty.NettyRemoteTransport" netty.tcp { hostname = ${?AKKA_HOST} port = ${?AKKA_PORT} bind-hostname = 0.0.0.0 } } } 

Este conf funciona y los posts se transfieren entre los contenedores