networking - Akka remoting binds to hostname instead of bind-hostname -
context
i trying run akka application on node , make work other nodes using akka remoting capabilities.
my node has ip address, 10.254.55.10
, , there external ip, 10.10.10.44
, redirecting former. external ip 1 on want other nodes contact me.
extract akka app config:
akka { remote { netty.tcp { hostname = "10.10.10.44" port = 2551 bind-hostname = "10.254.55.10" bind-port = 2551 } } }
i know works fine on network side, because when listen on ip netcat, can send messages myself via telnet using external ip.
in other words, when running these 2 commands in separate shells:
$ nc -l 10.254.55.10 2551
$ telnet 10.10.10.44 2551
i'm able communicate myself, proving network redirection works fine between 2 ips.
problem
when launching application, crashes bind error:
info remoting - starting remoting error a.r.t.n.nettytransport - failed bind /10.10.10.44:2551, shutting down netty transport exception in thread "main" java.lang.exceptionininitializererror [...] caused by: org.jboss.netty.channel.channelexception: failed bind to: /10.10.10.44:2551 [...] caused by: java.net.bindexception: cannot assign requested address [...] info a.r.remoteactorrefprovider$remotingterminator - shutting down remote daemon.
i assume makes crash tries bind ip not present locally (i.e. 10.10.10.44
). don't understand in first place why akka trying bind 10.10.10.44
, since not bind-hostname (which 10.254.55.10
). this doc page seemed pretty clear me on matter, yet doesn't work...
the project working based on akka 2.3.4, in bind-hostname
, bind-port
configuration not exist. upgraded latest version @ time, akka 2.4.1, , solved problem.
Comments
Post a Comment