Hi All, Am trying to integrate lagom persistence API with Play. lagom gitter channel is actively helping me with that. Now I am stuck with a play issue for which I need your help.
Problem statement: When am trying to run play + lagom in cluster mode.
I am getting this error: [error] a.r.EndpointWriter - dropping message [class akka.actor.ActorSelectionMessage] for non-local recipient [Actor[akka.tcp://inventory@127.0.0.1:2552/]] arriving at [akka.tcp://inventory@127.0.0.1:2552] inbound addresses are [akka.tcp://play-dev-mode@127.0.0.1:2552]
Here are my config files:
file: app.common.conf
play.akka.actor-system = “inventory”
akka {
actor.provider = “akka.cluster.ClusterActorRefProvider”
remote {
enabled-transports = [“akka.remote.netty.tcp”]
netty.tcp {
hostname = “127.0.0.1”
port = 2552
}
log-remote-lifecycle-events = off
}
cluster {
seed-nodes = [
“akka.tcp://inventory@127.0.0.1:2552”,
“akka.tcp://inventory@127.0.0.1:2551”]
}
}
file: app.development.conf
include “application.common.conf”
akka {
actor.provider = “akka.cluster.ClusterActorRefProvider”
remote {
enabled-transports = [“akka.remote.netty.tcp”]
netty.tcp {
hostname = “127.0.0.1”
port = 2551
}
log-remote-lifecycle-events = off
}
cluster {
seed-nodes = [
“akka.tcp://inventory@127.0.0.1:2552”,
“akka.tcp://inventory@127.0.0.1:2551”]
}
}
@TimMoore from lagom team helped me with following answer:
@adarshsingh_90_twitter looks like that actor system name isn’t being used: akka.tcp://play-dev-mode@127.0.0.1:2552
hmm OK so Play does have two actor systems
in development mode
Looks like the wrong one has remoting enabled
@adarshsingh_90_twitter I can’t find clear documentation about it, but here’s the source https://github.com/playframework/playframework/blob/2.6.x/framework/src/play-server/src/main/scala/play/core/server/DevServerStart.scala#L208-L224
@adarshsingh_90_twitter one of them is used for the Akka HTTP server, the other for the application itself
We want to disable remoting for the one running the server
People in the Play channel might have a better idea than I do
Can you guys point me to the right forum or help me with debug further!