> From: André Warnier [mailto:a...@ice-sa.com]
> 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,

Yes.

> 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" :-).

http://www.cs.northwestern.edu/~agupta/cs340/project2/TCPIP_State_Transition_Diagram.pdf
 (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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to