I am trying to run an akka application on a node and make it work with 
other nodes using akka remoting capabilities.


My node has an IP address, 10.254.55.10, and there is an external IP, 
10.10.10.44, redirecting to the former. This external IP is the one on 
which I want other nodes to contact me.


Extract from my 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 everything works fine on the network side, because when I listen on 
my IP with netcat, I can send messages to myself via telnet using the 
external IP.


In other words, when running these two commands in separate shells:

$ nc -l 10.254.55.10 2551 


$ telnet 10.10.10.44 2551


I'm able to communicate with myself, proving the network redirection works 
fine between the two IPs.


But when I launch the application, it crashes with a bind error:

INFO Remoting - Starting remoting
ERROR a.r.t.n.NettyTransport - failed to bind to /10.10.10.44:2551, shutting 
down Netty transport
Exception in thread "main" java.lang.ExceptionInInitializerError
[...]
Caused by: org.jboss.netty.channel.ChannelException: Failed to 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 what makes it crash is that it tries to bind to an IP that is not 
present locally (i.e. 10.10.10.44). But what I don't understand in first 
place is why akka is even trying to bind to 10.10.10.44, since it is not my 
bind-hostname (which is 10.254.55.10). This doc page 
<http://doc.akka.io/docs/akka/current/scala/remoting.html> seemed pretty 
clear to me on that matter, yet it doesn't work...


Thanks for your attention!

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to