Search code examples
dockerakkaakka-clusteramazon-ecs

Akka Cluster with bind-port and bind-hostname


After configuring bind-hostname and bind-port in application.conf, as specified by the Akka FAQ, and bringing up the cluster, I'm receiving an error:

[ERROR] [07/09/2015 19:54:24.132] [default-akka.remote.default-remote-dispatcher-20] 
[akka.tcp://[email protected]:2552/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2Fdefault%4054.175.105.30%3A2552-757/endpointWriter]
dropping message [class akka.actor.ActorSelectionMessage] 
for non-local recipient[Actor[akka.tcp://[email protected]:32810/]] 
arriving at [akka.tcp://[email protected]:32810] 
inbound addresses are [akka.tcp://[email protected]:2552]

What this seems to say is that the actor has received a message destined for port 32810 (the external port) but its dropping it because the internal port (2552) doesn't match.

The relevant portions of the file are:

  hostname = 54.175.105.30
  port = 32810

  bind-hostname = 172.17.0.44
  bind-port = 2552

I've tried this on 2.4-M1, 2.4-M2, and 2.4-SNAPSHOT, all with the same effect.

Has anyone else encountered this before? Any suggestions?

edit: This actor system is running in ECS in docker containers. The docker container configuration is set to forward from the ephemeral range to 2552 on the container's private IP. ECS is successfully mapping the hostname:port to bind-hosname:bind-port. The actor is successfully running and binding to the local bind-hostname and bind-port, but is dropping messages and emitting the error described above.


Solution

  • This was due to a misconfiguration on my end. Some boilerplate code was remaining that was overriding the bind-port.