I have a setup on Mesosphere that uses Marathon to deploy Docker applications. Now each of the Docker applications is a Play application that relies heavily on Akka remoting.
What Marathon does with Mesos DNS is that it assigns an internal DNS address to each cluster
of tasks.
Now, for a two of the docker containers, here's my situation:
Task ID: task-A
Task DNS: task-A.mesosphere.mesos
Akka remoting configuration:
app {
host = ${?APP_HOST}
akka {
port = 11112
}
}
akka {
jvm-exit-on-fatal-error = false
log-dead-letters = 0
actor {
provider = "akka.remote.RemoteActorRefProvider"
}
remote {
enabled-transports = ["akka.remote.netty.tcp"]
netty.tcp {
hostname = ${?app.host}
port = ${?app.akka.port}
}
}
}
Now the docker container of the application is launched with ports 9000
& 11112
open on both sides:
docker run -p 11112:11112 -h task-A.marathon.mesos ...
Similarly, for Task-B:
Task ID: task-A
Task DNS: task-A.mesosphere.mesos
Akka remoting configuration:
app {
host = ${?APP_HOST}
akka {
port = 11120
}
}
akka {
jvm-exit-on-fatal-error = false
log-dead-letters = 0
actor {
provider = "akka.remote.RemoteActorRefProvider"
}
remote {
enabled-transports = ["akka.remote.netty.tcp"]
netty.tcp {
hostname = ${?app.host}
port = ${?app.akka.port}
}
}
}
Now the docker container of the application is launched with port 11120
open on both sides:
docker run -p 11120:11120 -h task-B.marathon.mesos ...
Now the problem is that I cannot get the two tasks to communicate with each other via Akka. For example, if there's an ask from Task-B, I get exceptions: play.api.Application$$anon$1: Execution exception[[AskTimeoutException: Ask timed out on [ActorSelection[Anchor(akka.tcp://application@task-A.marathon.mesos:11112/), Path(/user/CoreMaster)]] after [15000 ms]]]
What could be wrong here?