Hi  Abud,

Akka Remote is not a client-server protocol, it is a p2p protocol.
If you want to use asymmetric communication (where nodes are not
symmetrically reachable), use Akka IO.

On Fri, May 6, 2016 at 9:57 AM, <enovo.s...@gmail.com> wrote:

>
> Hi,
> I am working on a simple client server application using akka (2.3.8)
> remoting, can not use latest version of akka due to java 8 dependency.  My
> client is behind NAT and server is listening on port 80.
> Here are the configurations for both client and server.
>
> *Client* *Configs*
> akka {
>   actor {
>     provider = "akka.remote.RemoteActorRefProvider"
>   }
>
>   remote {
>     netty.tcp {
>       hostname = "localhost"
>       port = 2552
>       send-buffer-size = 512000b
>       receive-buffer-size = 512000b
>       maximum-frame-size = 10000000b
>     }
>
>     untrusted-mode = off
>
>     transport-failure-detector {
>       heartbeat-interval = 30 s   # default 4s
>       acceptable-heartbeat-pause = 20 s  # default 10s
>     }
>
>   }
> }
>
>
>
> *Server Configs*akka {
>   actor {
>     provider = "akka.remote.RemoteActorRefProvider"
>   }
>
>   remote {
>     netty.tcp {
>       hostname = "localhost"
>       port = 80
>       send-buffer-size = 512000b
>       receive-buffer-size = 512000b
>       maximum-frame-size = 10000000b
>     }
>     untrusted-mode = off
>
>     transport-failure-detector {
>       heartbeat-interval = 30 s   # default 4s
>       acceptable-heartbeat-pause = 20 s  # default 10s
>     }
>
>   }
> }
>
> Hostname for both client and server are being set programmatically in the
> following manner:
>         String conf = "akka.remote.netty.tcp.hostname =\"" +
> client_host_name +"\"";
>         actorSystem = ActorSystem.create(CLIENT_NAME,
> ConfigFactory.parseString(conf).withFallback(ConfigFactory.load(CONFIG_FILE)));
>
> My application works fine when both client and server are located in the
> same (local) network. When i deploy server on a remote location, server
> listens on live IP address and i can connect to server from client using
> live IP address.  When i deploy my client on a network using NAT (client
> uses private IP address), application no longer works, starts getting
> following errors:
>
>
> *Server Logs:*
> [ERROR] [Server-Service-akka.remote.default-remote-dispatcher-6]
> [akka.tcp://Server-Service@server:80/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2FClient%40192.168.10.201%3A2552-0/endpointWriter]
> dropping message [class akka.actor.ActorSelectionMessage] for non-local
> recipient [Actor[akka.tcp://Server-Service@132.221.167.190:80/]] arriving
> at [akka.tcp:/
> /Server-Service@132.221.167.190:80] inbound addresses are
> [akka.tcp://Server-Service@server:80]
>
>
> *Client-Logs*[INFO] [Client-akka.remote.default-remote-dispatcher-6]
> [akka.tcp://
> Client@192.168.10.201:2552/system/transports/akkaprotocolmanager.tcp0/akkaProtocol-tcp%3A%2F%2FServer-Service%40132.221.167.190%3A80-1]
> No response from remote. Handshake timed out or transport failure detector
> triggered.
>
> Could anybody please suggest what i am missing here.
>
> Thank you
> Abud
>
>
>
>
>
>
>
>
> --
> >>>>>>>>>> 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 akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Cheers,
√

-- 
>>>>>>>>>>      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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
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