tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Crowther <>
Subject [Mildly OT] RE: apache/tomcat communication issues (502 response)
Date Wed, 08 Apr 2009 08:58:06 GMT
> From: André Warnier []
> a TCP CLOSE_WAIT state happens when the writing side of a TCP
> connection
> has finished writing and (nicely) closes its side of the socket to
> indicate the fact,


> but the reading side of the connection does not read
> what is left in the buffers, so there is still some data unread in the
> pipeline,

No.  It merely means that the reader has not yet closed the socket.  You're putting more context
behind that than there really is - the reader may, for example, have read all the data, but
never have issued the close() call.

> and the reading side never closes the socket.

"Has not yet closed" :-). (itself
reproduced from "TCP/IP Illustrated, Volume 2") is a useful resource if you want to know what
the states mean.  If you're seeing CLOSE_WAITs on the Tomcat server, it means the client has
sent a FIN and Tomcat's ACKed that.  If you can, look on the client to see what's happening.
 If you see connections in FIN_WAIT_1, the client never got the ACK from Tomcat, if you see
connections in FIN_WAIT_2, the client got the ACK and is sitting around waiting for Tomcat
to close the connection and send a FIN.

                - Peter

P.S. Yes, I used to teach this stuff ;-).

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message