Chandan Talukdar
Chandan Talukdar

Reputation: 23

RST packet sent from application when TCP connection not getting closed properly

I have a Web service based application, where the web server is running in the application on a particular port. Recently in the production environment, I have noticed that application is sending a RST packet to the client side resetting the connection. After analyzing the TCP dump, I have observed that the TCP 4 way connection closure is not happening properly. After sending a response from application web server to the client, the application is sending a FIN packet to the client and receiving an ACK, but there is no FIN packet initiation from the client side to the application, instead some request packet is received. At this point, the application sends a RST packet to the client as the application was expecting a FIN packet initiation from the client. This results in loss of the request packet. I believe this is a normal/expected behavior of the web server application and needs to be fixed in the client side.

Please comment on the above scenario. your comments will be much appreciated.

Thanks in advance

Upvotes: 2

Views: 4007

Answers (1)

user207421
user207421

Reputation: 310913

The client is ignoring the EOS condition on the socket and continuing to write. The client will then get a 'connection reset by peer'. This is basically an application protocol error. Either the client shouldn't be sending another request on the same conneciton, or the server should be looking for it instead of closing the connection after the first response.

Upvotes: 1

Related Questions