From 5e1913cac25ea0cde51cd515282f60c21c201bf9 Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Tue, 17 Sep 2013 16:52:08 +0200 Subject: [PATCH] =clu #3533 Harden cluster startup error handling --- akka-cluster/src/main/scala/akka/cluster/Cluster.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/akka-cluster/src/main/scala/akka/cluster/Cluster.scala b/akka-cluster/src/main/scala/akka/cluster/Cluster.scala index 8394ae5bd2..4e917df321 100644 --- a/akka-cluster/src/main/scala/akka/cluster/Cluster.scala +++ b/akka-cluster/src/main/scala/akka/cluster/Cluster.scala @@ -166,9 +166,12 @@ class Cluster(val system: ExtendedActorSystem) extends Extension { Await.result((clusterDaemons ? InternalClusterAction.GetClusterCoreRef).mapTo[ActorRef], timeout.duration) } catch { case NonFatal(e) ⇒ - log.error(e, "Failed to startup Cluster") + log.error(e, "Failed to startup Cluster. You can try to increase 'akka.actor.creation-timeout'.") shutdown() - throw e + // don't re-throw, that would cause the extension to be re-recreated + // from shutdown() or other places, which may result in + // InvalidActorNameException: actor name [cluster] is not unique + system.deadLetters } }