telnet - "Connection closed by foreign host"

The process that is listening for connections on port 7077 is accepting the connection and then immediately closing the connection. The problem lies somewhere in that application's code or configuration, not in the system itself.


I just learned of an odd behaviour in some virtual servers, especially those that are run NAT. You connect to the port exposed by the virtual server to the outside; the server then tries to forward the connection to a target; the target refuses. So the NAT will close your connection with no message whatsoever. Pull your hair out trying to figure out what's going on. This is very much like the previous answer; the source is the interaction in the virtual host itself.

The most likely cause is that someone is using the port, and the application running only accepts one connection at a time, and refuses any additional connections.


The application has policy restrictions to connect only from localhost. Same "problem" with elasticsearch. You can check your app-config or you can make a tunnel. Do

ssh -N -L 7077:127.0.0.1:7077 userxy@spark

then on your machine:

telnet 127.0.0.1 7077

Tags:

Telnet