08:11:39.893 [sgActors-akka.actor.default-dispatcher-17] ERROR a.c.ClusterCoreSupervisor: actor name [cluster] is not unique!akka.actor.InvalidActorNameException: actor name [cluster] is not unique!
--
>>>>>>>>>> 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 akka-user+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
Patrik Nordwall
Typesafe - Reactive apps on the JVM
Twitter: @patriknw
class ClusterWaiter(p: Promise[Boolean]) extends Actor {
override def receive = {
case _ =>
p.complete(Success(true))
context.stop(self)
}
}
def startCluster() = {
//eagerly init cluster dispatcher, the one used to start cluster daemon
system.dispatchers.lookup("cluster-dispatcher")
val p = Promise[Boolean]
val waiter = system.actorOf(actor.Props(classOf[ClusterWaiter], p), "cluster-waiter")
// sendCurrentClusterState requires internal cluster actor to start
Cluster(system).sendCurrentClusterState(waiter)
//wait for some signal from cluster
Await.ready(p.future, 60 seconds)
}
private[cluster] def shutdown(): Unit = {
if (_isTerminated.compareAndSet(false, true)) {
logInfo("Shutting down...")
system.stop(clusterDaemons)
readView.close()
closeScheduler()
clusterJmx foreach { _.unregisterMBean() }
logInfo("Successfully shut down")
}
}
Problem still persists.1. I changed boot procedure to wait until cluster starts. it is done by:class ClusterWaiter(p: Promise[Boolean]) extends Actor {
override def receive = {
case _ =>
p.complete(Success(true))
context.stop(self)
}
}def startCluster() = {
//eagerly init cluster dispatcher, the one used to start cluster daemon
system.dispatchers.lookup("cluster-dispatcher")
val p = Promise[Boolean]
val waiter = system.actorOf(actor.Props(classOf[ClusterWaiter], p), "cluster-waiter")
// sendCurrentClusterState requires internal cluster actor to start
Cluster(system).sendCurrentClusterState(waiter)
//wait for some signal from cluster
Await.ready(p.future, 60 seconds)
}In that time, nothing else takes CPU or IO, app just waits for cluster to start2. I changed actor creation timeout to 120 seconds3. Still I get exceptions on startup:
12:15:43.025 [sgActors-akka.actor.default-dispatcher-3] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgActors@app1.groupl.es:2552] - Starting up...
12:17:43.201 [sgActors-akka.actor.default-dispatcher-20] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgActors@app1.groupl.es:2552] - Starting up...
12:17:43.187 [sgActors-akka.actor.default-dispatcher-4] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgActors@app1.groupl.es:2552] - Starting up...12:17:43.187 [sgActors-akka.actor.default-dispatcher-4] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgActors@app1.groupl.es:2552] - Starting up...12:17:43.188 [sgActors-akka.actor.default-dispatcher-4] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgActors@app1.groupl.es:2552] - Starting up...12:17:43.201 [sgActors-akka.actor.default-dispatcher-20] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgActors@app1.groupl.es:2552] - Starting up...
On Wed, Aug 26, 2015 at 3:50 PM, Marek Żebrowski <marek.z...@gmail.com> wrote:
Problem still persists.1. I changed boot procedure to wait until cluster starts. it is done by:class ClusterWaiter(p: Promise[Boolean]) extends Actor {
override def receive = {
case _ =>
p.complete(Success(true))
context.stop(self)
}
}def startCluster() = {
//eagerly init cluster dispatcher, the one used to start cluster daemon
system.dispatchers.lookup("cluster-dispatcher")
val p = Promise[Boolean]
val waiter = system.actorOf(actor.Props(classOf[ClusterWaiter], p), "cluster-waiter")
// sendCurrentClusterState requires internal cluster actor to start
Cluster(system).sendCurrentClusterState(waiter)
//wait for some signal from cluster
Await.ready(p.future, 60 seconds)
}In that time, nothing else takes CPU or IO, app just waits for cluster to start2. I changed actor creation timeout to 120 seconds3. Still I get exceptions on startup:
12:15:43.025 [sgActors-akka.actor.default-dispatcher-3] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgActors@app1.groupl.es:2552] - Starting up...
12:17:43.201 [sgActors-akka.actor.default-dispatcher-20] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgActors@app1.groupl.es:2552] - Starting up...
12:17:43.187 [sgActors-akka.actor.default-dispatcher-4] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgActors@app1.groupl.es:2552] - Starting up...12:17:43.187 [sgActors-akka.actor.default-dispatcher-4] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgActors@app1.groupl.es:2552] - Starting up...12:17:43.188 [sgActors-akka.actor.default-dispatcher-4] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgActors@app1.groupl.es:2552] - Starting up...12:17:43.201 [sgActors-akka.actor.default-dispatcher-20] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgActors@app1.groupl.es:2552] - Starting up...
12:15:43.025 [sgActors-akka.actor.default-dispatcher-3] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgAc...@app1.groupl.es:2552] - Starting up...
12:17:43.201 [sgActors-akka.actor.default-dispatcher-20] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgAc...@app1.groupl.es:2552] - Starting up...
12:17:43.187 [sgActors-akka.actor.default-dispatcher-4] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgAc...@app1.groupl.es:2552] - Starting up...12:17:43.187 [sgActors-akka.actor.default-dispatcher-4] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgAc...@app1.groupl.es:2552] - Starting up...12:17:43.188 [sgActors-akka.actor.default-dispatcher-4] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgAc...@app1.groupl.es:2552] - Starting up...12:17:43.201 [sgActors-akka.actor.default-dispatcher-20] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgAc...@app1.groupl.es:2552] - Starting up...
12:15:43.025 [sgActors-akka.actor.default-dispatcher-3] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgActors@app1.groupl.es:2552] - Starting up...
12:17:43.201 [sgActors-akka.actor.default-dispatcher-20] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgActors@app1.groupl.es:2552] - Starting up...
12:17:43.187 [sgActors-akka.actor.default-dispatcher-4] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgActors@app1.groupl.es:2552] - Starting up...12:17:43.187 [sgActors-akka.actor.default-dispatcher-4] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgActors@app1.groupl.es:2552] - Starting up...12:17:43.188 [sgActors-akka.actor.default-dispatcher-4] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgActors@app1.groupl.es:2552] - Starting up...12:17:43.201 [sgActors-akka.actor.default-dispatcher-20] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgActors@app1.groupl.es:2552] - Starting up...
Probably you want to add a note to docs in
12:15:43.025 [sgActors-akka.actor.default-dispatcher-3] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgAc...@app1.groupl.es:2552] - Starting up...
12:17:43.201 [sgActors-akka.actor.default-dispatcher-20] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgAc...@app1.groupl.es:2552] - Starting up...
12:17:43.187 [sgActors-akka.actor.default-dispatcher-4] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgAc...@app1.groupl.es:2552] - Starting up...12:17:43.187 [sgActors-akka.actor.default-dispatcher-4] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgAc...@app1.groupl.es:2552] - Starting up...12:17:43.188 [sgActors-akka.actor.default-dispatcher-4] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgAc...@app1.groupl.es:2552] - Starting up...12:17:43.201 [sgActors-akka.actor.default-dispatcher-20] INFO Cluster(akka://sgActors): Cluster Node [akka.tcp://sgAc...@app1.groupl.es:2552] - Starting up...