Hello, I have been developing a cluster solution in akka for awhile. It is
working fine together with the old code in my development environment.
But now when its time to deploy the solution and test it live I run into a
strange problem. The program simply stops doing anything when doing
ActorSystem.create here, the last log is the one right above, nothing
happens after that system seems to hang.
private void startAkkaClusterMember(boolean master, int port) {
Config conf = null;
log.debug("Creating config for actor system");
if (master) {
conf =
ConfigFactory.parseString("akka.cluster.roles=[master]").withFallback(ConfigFactory.parseString("akka.remote.netty.tcp.port="
+ port))
.withFallback(ConfigFactory.load("application"));
} else {
conf =
ConfigFactory.parseString("akka.cluster.roles=[worker]").withFallback(ConfigFactory.parseString("akka.remote.netty.tcp.port="
+ port))
.withFallback(ConfigFactory.load("application"));
}
if (master) {
log.debug("Trying to create ActorSystem");
-> system = ActorSystem.create("ClusterSystem", conf);
log.debug("System created " + system.name());
this.actor =
system.actorOf(Props.create(ClusterMemberActor.class), "master");
system.actorOf(
ClusterSingletonManager.defaultProps(Props.create(ActiveMasterActor.class,
this.actor), "master", PoisonPill.getInstance(), "master"),
"active");
} else {
system = ActorSystem.create("ClusterSystem", conf);
this.actor =
system.actorOf(Props.create(ClusterMemberActor.class), "worker");
}
log.debug("Done creating actor system " + this.actor);
}
This is my config file, I have confirmed that it gets read properly by
logging the contents
akka {
loggers = ["akka.event.slf4j.Slf4jLogger"]
loglevel = "DEBUG"
logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"
actor {
provider = "akka.cluster.ClusterActorRefProvider"
}
remote {
log-remote-lifecycle-events = off
netty.tcp {
hostname = "127.0.0.1"
port = 0
}
}
cluster {
seed-nodes = [
"akka.tcp://[email protected]:2551",
"akka.tcp://[email protected]:2552"]
auto-down-unreachable-after = 5s
failure-detector {
threshold = 8.0
min-std-deviation = 100 ms
acceptable-heartbeat-pause = 3 s
}
}
}
--
>>>>>>>>>> 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.