There are ‘abc-service’ and ‘relation-service’, both with entity and ReadSideProcessor,when register to its own seed, both work well. but form a cluster, register one to the other seed, error happens.
manual create readside keyspaces and tables, so ReadSideHandler without setGlobalPrepare handler.
error:
[2020-11-04 14:56:17,188] [ERROR] [akka.actor.OneForOneStrategy] [] [abc-service-akka.actor.default-dispatcher-18] - Ask timed out on [Actor[akka://abc-service/user/readSideGlobalPrepare-RetrieveReadProcessor-singletonProxy#-261176397]] after [20000 ms]. Message of type [com.lightbend.lagom.internal.persistence.cluster.ClusterStartupTaskActor$Execute$]. A typical reason for `AskTimeoutException` is that the recipient actor didn't send a reply.
akka.pattern.AskTimeoutException: Ask timed out on [Actor[akka://abc-service/user/readSideGlobalPrepare-RetrieveReadProcessor-singletonProxy#-261176397]] after [20000 ms]. Message of type [com.lightbend.lagom.internal.persistence.cluster.ClusterStartupTaskActor$Execute$]. A typical reason for `AskTimeoutException` is that the recipient actor didn't send a reply.
at akka.pattern.PromiseActorRef$.$anonfun$defaultOnTimeout$1(AskSupport.scala:647)
at akka.pattern.PromiseActorRef$.$anonfun$apply$1(AskSupport.scala:668)
at akka.actor.Scheduler$$anon$7.run(Scheduler.scala:476)
at scala.concurrent.ExecutionContext$parasitic$.execute(ExecutionContext.scala:164)
at akka.actor.LightArrayRevolverScheduler$TaskHolder.executeTask(LightArrayRevolverScheduler.scala:358)
at akka.actor.LightArrayRevolverScheduler$$anon$3.executeBucket$1(LightArrayRevolverScheduler.scala:309)
at akka.actor.LightArrayRevolverScheduler$$anon$3.nextTick(LightArrayRevolverScheduler.scala:313)
at akka.actor.LightArrayRevolverScheduler$$anon$3.run(LightArrayRevolverScheduler.scala:265)
at java.lang.Thread.run(Thread.java:748)
there is config related:
abc-service config:
lagom.services = {
abc-service = "http://127.0.0.1:"${http.port}""
relation-service = "http://127.0.0.1:9003"
}
akka {
actor {
provider = "cluster"
}
remote.artery {
transport = tcp
canonical {
hostname = "127.0.0.1"
port = 2551
}
}
cluster {
seed-nodes = [
"akka://"${play.akka.actor-system}"@127.0.0.1:2551"
]
}
cluster.roles = ["abc-service"]
cluster.min-nr-of-members =1
cluster.role{
abc-service.min-nr-of-members=1
relation-service.min-nr-of-members=1
}
cluster.sharding {
role="abc-service"
}
}
akka {
discovery.method = config
}
akka.discovery.config.services = {
abc-service = {
endpoints = [{
host = "127.0.0.1"
port = ${http.port}
}]
},
relation-service = {
endpoints = [{
host = "127.0.0.1"
port = 9003
}]
}
}
relation-service:
lagom.services = {
relation-service = "http://127.0.0.1:"${http.port}""
abc-service = "http://127.0.0.1:9003"
}
akka {
actor {
provider = "cluster"
}
remote.artery {
transport = tcp
canonical {
hostname = "127.0.0.1"
port = 2552
}
}
cluster {
seed-nodes = [
"akka://"${play.akka.actor-system}"@127.0.0.1:2551"
]
}
cluster.roles = ["relation-service"]
cluster.min-nr-of-members =1
cluster.role{
abc-service.min-nr-of-members=1
relation-service.min-nr-of-members=1
}
cluster.sharding {
role="relation-service"
}
}
akka.discovery.config.services = {
relation-service = {
endpoints = [{
host = "127.0.0.1"
port = ${http.port}
}]
},
abc-service = {
endpoints = [{
host = "127.0.0.1"
port = 9003
}]
}
}
AkkaVersion = “2.6.5”