1

I have 2 applications say app1 and app2. On machine 1, both app1 and app2 runs but on machine 2 only app2 runs, as most of the work is done by app2. The apps use Akka.

Using akka remoting, I want to be able to pass message from app1 on machine 1 to app2 on machine 2. app1 and 2 are able to interact with each other when they are on same machines.

However when app 1 on machine 1 tries to connect with app2 on machine 2 it gets below error...

EndpointWriter - AssociationError [akka.tcp://deal-rest@127.0.0.1:4242] -> [akka.tcp://deal@:4241]: Error [Invalid address: akka.tcp://deal@:4241] [ akka.remote.InvalidAssociation: Invalid address: akka.tcp://deal@:4241 Caused by: akka.remote.transport.Transport$InvalidAssociationException: Connection refused: /:4241

When I run netstat -a | egrep 'Proto|LISTEN' on machine 2, I got below response tcp6 0 0 localhost:4241 [::]:* LISTEN

This indicates that the app2 is running and able to listen on 4241.

Also, the port 4241 is open on machine1 and 2.

Any suggestion will be helpful. Thanks.

4

1 回答 1

1

看起来您的应用程序已绑定到机器 2 上的 localhost 接口。它应该绑定到公共接口(类似于192.168....,而不是127.0.0.1/ localhost)以便外部网络可以访问。您可以通过 telnet 进入它以检查:

telnet machine2hostname 4241
于 2015-04-01T02:55:42.997 回答