JasperJ JasperJ - 9 months ago 79
Scala Question

Listening to Akka-HTTP ports remotely

When binding calls to port 9000 with Akka-HTTP

Http().bindAndHandle(routes, "localhost", 9000)

It starts listening to the port as seen with 'netstat -tulpn'

Proto Recv-Q Send-Q Local Address Foreign Address State
tcp6 0 0 :::* LISTEN

Locally this port can be used. However, when I make a remote call I get:

curl: (7) Failed to connect to port 9000: Connection refused

Even though pinging is possible and the devices are directly connected. What am I doing wrong?


Replace localhost with and it will work. localhost is intended to be used only locally.