Akka cluster with bind port and bind-hostname

After setting bind-hostname and bind-port in application.conf, as stated in Akka's frequently asked questions , and also to create a cluster, I'm getting the error:

[ERROR] [07/09/2015 19:54:24.132] [default-akka.remote.default-remote-dispatcher-20] [akka.tcp:// default@54.175.105.30 :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:// default@54.175.105.30 :32810/]] arriving at [akka.tcp:// default@54.175.105.30 :32810] inbound addresses are [akka.tcp:// default@54.175.105.30 :2552] 

What seems to be saying that the actor received a message destined for port 32810 (external port), but discarding it because the internal port (2552) does not match.

Relevant parts of the file:

  hostname = 54.175.105.30 port = 32810 bind-hostname = 172.17.0.44 bind-port = 2552 

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

Has anyone else come across this before? Any suggestions?

edit: This acting system works in ECS in docker containers. The configuration of the docker container is set in the direction from the ephemeral range to 2552 on a private IP container. ECS successfully displays hostname: port for bind-hosname: bind-port. The actor successfully works and binds to the local host-binding name and the connecting port, but it discards messages and emits the error described above.

+5
source share
2 answers

This was due to a misconfiguration at my end. There was one more template code that overlapped the binding port.

0
source

bind-* configuration parameters are intended for use in situations where Akka hosts are started behind NAT (or in docker containers). Have you configured address translation from hostname : port to bind-hostname : bind-port ?

In your specific configuration, when you do

  ctx.actorSelection ("akka.tcp: // default@54.175.105.30 : 32810 / user / actor")!  Hi

then someone from 54.175.105.30 should listen on TCP port 32810 and port forwarding to 172.17.0.44:2552 . The actor system should work with your installed configuration at 172.17.0.44:2552 . Is that the case?

You must also configure this for each node that is behind NAT, because the connections between Actor Systems are equal .

+6
source

All Articles