public
Created

akka-remote connection forcing wont shutdown immediately, must wait for execution-pool-keepalive

  • Download Gist
Communication.scala
Scala
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
case "bind" =>
val newRemoteActorsMap = routerConnectionOption match {
//avoid trying to connect to self.
case Some(localAkkaConnection) if localAkkaConnection != remoteAkkaConnection ?
//create a new actor for the remote node to send to
val localVoiceRecipient = context.actorOf(Props[VoiceRecipient], remoteAkkaConnection.actorNameString)
 
//get a reference to the textChat/voicechat actor on the remote node that the we should send to.
val remoteChatDisplayBox = context.actorFor(remoteAkkaConnection.uriString + """/user/chatDisplayBox""")
//akka://node/user/mq-connection/$a/21EC20203AEA1069A2DD08002B30309D/747411172553]
val remoteVoiceRecipient = context.actorFor(remoteAkkaConnection.uriString + """/user/mq-connection/$a/""" + roomUID + """/""" + localAkkaConnection.actorNameString)
 
val remoteActors = RemoteActors(remoteChatDisplayBox, remoteVoiceRecipient, localVoiceRecipient)
 
context.system.eventStream.subscribe(remoteChatDisplayBox, classOf[TextChatMessage])
context.system.eventStream.subscribe(remoteVoiceRecipient, classOf[EncodingMicrophoneReaderMessage])
remoteActorsMap.updated(remoteAkkaConnection.uriString, remoteActors)
 
case _ => remoteActorsMap
}
 
(PresenceBind(presence), newRemoteActorsMap)
shutdownErrorLog
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
[INFO] [2012-11-07 21:19:26,429] [node-akka.actor.default-dispatcher-39] (akka.actor.ActorSystemImpl) : Beginning Shutdown of Akka Server, terminating actors
[DEBUG] [2012-11-07 21:19:26,433] [node-akka.actor.default-dispatcher-40] (akka.amqp.ConnectionActor) : Disconnecting from amqp://projuser@107.107.107.107:5672/proj/apportation
WinMessageQueue2.stop:Interruption
interrupted
[DEBUG] [2012-11-07 21:19:26,506] [node-akka.actor.default-dispatcher-40] (com.proj.node.audio.MicReadLoop) : signaling MicReadLoop to stop
[DEBUG] [2012-11-07 21:19:26,507] [node-akka.actor.default-dispatcher-39] (com.proj.node.audio.MicReadLoop) : threadIsDefined: signaling MicReadLoop to stop
[DEBUG] [2012-11-07 21:19:26,507] [node-akka.actor.default-dispatcher-39] (com.proj.node.audio.MicReadLoop) : signaling MicReadLoop to resume
[DEBUG] [2012-11-07 21:19:26,507] [node-akka.actor.default-dispatcher-39] (com.proj.node.audio.MicReadLoop) : threadIsDefined: signaling MicReadLoop to resume
[DEBUG] [2012-11-07 21:19:26,507] [node-akka.actor.default-dispatcher-39] (com.proj.node.audio.MicReadLoop) : MicReadLoop is dead
[INFO] [2012-11-07 21:19:26,553] [node-akka.actor.default-dispatcher-41] (akka.amqp.ConnectionActor) : Successfully disconnected from amqp://projuser@107.107.107.107:5672/proj/apportation
[DEBUG] [2012-11-07 21:19:26,608] [node-akka.actor.default-dispatcher-41] (akka.amqp.ConnectionActor) : Successfully disposed
[DEBUG] [2012-11-07 21:19:26,659] [node-akka.actor.default-dispatcher-39] (akka.event.EventStream) : shutting down: StandardOutLogger started
[DEBUG] [11/07/2012 21:19:26.659] [node-akka.actor.default-dispatcher-40] [EventStream] shutting down: StandardOutLogger started
[DEBUG] [11/07/2012 21:19:26.672] [node-akka.actor.default-dispatcher-40] [EventStream] all default loggers stopped
Akka server: Shutdown successful
[ERROR] [11/07/2012 21:19:27.657] [node-scheduler-1] [ActorSystem(node)] Uncaught error from thread [node-scheduler-1]
java.lang.IllegalStateException: cannot enqueue after shutdown
at akka.util.internal.HashedWheelTimer.scheduleTimeout(HashedWheelTimer.java:273)
at akka.util.internal.HashedWheelTimer$Worker.fetchExpiredTimeouts(HashedWheelTimer.java:355)
at akka.util.internal.HashedWheelTimer$Worker.fetchExpiredTimeouts(HashedWheelTimer.java:321)
at akka.util.internal.HashedWheelTimer$Worker.run(HashedWheelTimer.java:308)
at java.lang.Thread.run(Unknown Source)
 
[DEBUG] [11/07/2012 21:19:27.709] [node-akka.actor.default-dispatcher-39] [RemoteClient(akka://node)] Shutting down remote client [ActiveRemoteClient@akka://node@74.74.74.74:2553]
[INFO] [11/07/2012 21:19:27.714] [node-akka.actor.default-dispatcher-39] [NettyRemoteTransport(akka://node@74.74.74.74:2552)] RemoteClientShutdown@akka://node@74.74.74.74:2553
[DEBUG] [11/07/2012 21:19:27.736] [node-2] [NettyRemoteTransport(akka://node@74.74.74.74:2552)] RemoteClientDisconnected@akka://node@74.74.74.74:2553
[DEBUG] [11/07/2012 21:19:27.773] [node-akka.actor.default-dispatcher-39] [RemoteClient(akka://node)] [ActiveRemoteClient@akka://node@74.74.74.74:2553] has been shut down
[INFO] [11/07/2012 21:19:27.792] [node-akka.actor.default-dispatcher-39] [NettyRemoteTransport(akka://node@74.74.74.74:2552)] RemoteServerShutdown@akka://node@74.74.74.74:2552
shutdownLog
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
[DEBUG] [2012-11-07 21:46:12,600] [node-akka.actor.default-dispatcher-7] (RemoteClient(akka://node)) : Sending message TextMessage(Second,fg) from None to Actor[akka://node@74.74.74.74:2553/user/chatDisplayBox]
[INFO] [2012-11-07 21:46:27,766] [node-akka.actor.default-dispatcher-8] (akka.actor.ActorSystemImpl) : Beginning Shutdown of Akka Server, terminating actors
[DEBUG] [2012-11-07 21:46:27,766] [node-akka.actor.default-dispatcher-8] (akka.amqp.ConnectionActor) : Disconnecting from amqp://projuser@107.107.107.107:5672/proj/apportation
[INFO] [2012-11-07 21:46:27,931] [node-akka.actor.default-dispatcher-2] (akka.amqp.ConnectionActor) : Successfully disconnected from amqp://projuser@107.107.107.107:5672/proj/apportation
[DEBUG] [2012-11-07 21:46:27,971] [node-akka.actor.default-dispatcher-11] (com.proj.node.audio.MicReadLoop) : signaling MicReadLoop to stop
[DEBUG] [2012-11-07 21:46:27,995] [node-akka.actor.default-dispatcher-11] (com.proj.node.audio.MicReadLoop) : threadIsDefined: signaling MicReadLoop to stop
[DEBUG] [2012-11-07 21:46:27,995] [node-akka.actor.default-dispatcher-11] (com.proj.node.audio.MicReadLoop) : signaling MicReadLoop to resume
[DEBUG] [2012-11-07 21:46:27,997] [node-akka.actor.default-dispatcher-8] (com.proj.node.audio.MicReadLoop) : threadIsDefined: signaling MicReadLoop to resume
[DEBUG] [2012-11-07 21:46:27,999] [node-akka.actor.default-dispatcher-10] (com.proj.node.audio.MicReadLoop) : MicReadLoop is dead
[DEBUG] [2012-11-07 21:46:28,027] [node-akka.actor.default-dispatcher-13] (akka.amqp.ConnectionActor) : Successfully disposed
[DEBUG] [2012-11-07 21:46:28,087] [node-akka.actor.default-dispatcher-13] (akka.event.EventStream) : shutting down: StandardOutLogger started
[DEBUG] [11/07/2012 21:46:28.087] [node-akka.actor.default-dispatcher-9] [EventStream] shutting down: StandardOutLogger started
[DEBUG] [11/07/2012 21:46:28.099] [node-akka.actor.default-dispatcher-9] [EventStream] all default loggers stopped
Akka server: Shutdown successful
[DEBUG] [11/07/2012 21:46:29.161] [node-akka.actor.default-dispatcher-9] [RemoteClient(akka://node)] Shutting down remote client [ActiveRemoteClient@akka://node@74.74.74.74:2553]
[INFO] [11/07/2012 21:46:29.163] [node-akka.actor.default-dispatcher-9] [NettyRemoteTransport(akka://node@74.74.74.74:2552)] RemoteClientShutdown@akka://node@74.74.74.74:2553
[DEBUG] [11/07/2012 21:46:29.178] [node-2] [NettyRemoteTransport(akka://node@74.74.74.74:2552)] RemoteClientDisconnected@akka://node@74.74.74.74:2553
[DEBUG] [11/07/2012 21:46:29.224] [node-akka.actor.default-dispatcher-9] [RemoteClient(akka://node)] [ActiveRemoteClient@akka://node@74.74.74.74:2553] has been shut down
[INFO] [11/07/2012 21:46:29.247] [node-akka.actor.default-dispatcher-9] [NettyRemoteTransport(akka://node@74.74.74.74:2552)] RemoteServerShutdown@akka://node@74.74.74.74:2552
[success] Total time: 232 s, completed Nov 7, 2012 9:46:59 PM

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.