Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When I telnet one port of my server, it give me an error: "Connection closed by foreign host", anyone can tell the reason ? thanks!

share|improve this question
    
sorry ! the problem is gone ! –  larry Jan 19 '11 at 2:13
    
You have provided next to no information and are expecting an answer?? –  Sameer Jan 19 '11 at 2:28

2 Answers 2

up vote 0 down vote accepted

Given only the informational message from telnet, most likely, the application that accepted your tcp connection either closed the connection on it's own accord or the application crashed/died.

The reason is that all "Connection closed by foreign host." by itself indicates is that the telnet application is of the opinion that the connection was shut down cleanly and the remote end initiated the shutdown. (And the OS/IP-stack (at least on my linux) will do a tcp-teardown if the application suddenly disappears, kill -9). To find out exactly why, your best bet would be if the application that listens to the port you telneted to logs somewhere and looking there for clues.

If this were to be network related you'd be far more likely to see something along the lines of timeout (or nothing happening at all) or connection reset by peer. If this somehow were caused by something along the network, that something would have to sort-of hijack your tcp-session to do the teardown handshake.

share|improve this answer

The packets weren't reaching the server for one reason or another. It could have been transient network problems, a loop somewhere between you and the server, a mis-configured firewall... with this little information it's impossible to tell.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.