What does "connection reset by peer" mean?

Franck Freiburger picture Franck Freiburger · Sep 16, 2009 · Viewed 877.8k times · Source

What is the meaning of the "connection reset by peer" error on a TCP connection? Is it a fatal error or just a notification or related to the network failure?

Answer

ire_and_curses picture ire_and_curses · Sep 16, 2009

It's fatal. The remote server has sent you a RST packet, which indicates an immediate dropping of the connection, rather than the usual handshake. This bypasses the normal half-closed state transition. I like this description:

"Connection reset by peer" is the TCP/IP equivalent of slamming the phone back on the hook. It's more polite than merely not replying, leaving one hanging. But it's not the FIN-ACK expected of the truly polite TCP/IP converseur.