Re: The problem of CLOSE_WAIT
On Tue, 17 Sep 2002 17:07:06 +0800, Öܹ⻪ wrote: After few days, on the server side, there are many ssl socket connection did not exit clean, they are mostly in close_wait state and few in established state. Do you understand what the CLOSE_WAIT state means and how sockets get in that state? DS __ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]
Re: The problem of CLOSE_WAIT
I think CLOSE_WAIT state means it is still waitting for the other side's FD_CLOSE notification, (perhaps shutdown function of ssl or socket will send this notification), but the other side had already exit and successfully closed the connection, (perhaps it exited with exceptions or it is killed by others). so the server stay in CLOSE_WAIT state always. But the child process forked by the server has already exit. - Original Message - From: David Schwartz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 17, 2002 5:31 PM Subject: Re: The problem of CLOSE_WAIT On Tue, 17 Sep 2002 17:07:06 +0800, Öܹ⻪ wrote: After few days, on the server side, there are many ssl socket connection did not exit clean, they are mostly in close_wait state and few in established state. Do you understand what the CLOSE_WAIT state means and how sockets get in that state? DS __ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED] __ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]
Re: The problem of CLOSE_WAIT
This page (http://mictlan.sfsu.edu/~dachen/documents/Overview.htm) has a good description of the states. CLOSE_WAIT means that the peer shutdown the connection and the application still has it open. - Original Message - From: 周光华 [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 17, 2002 8:26 PM Subject: Re: The problem of CLOSE_WAIT I think CLOSE_WAIT state means it is still waitting for the other side's FD_CLOSE notification, (perhaps shutdown function of ssl or socket will send this notification), but the other side had already exit and successfully closed the connection, (perhaps it exited with exceptions or it is killed by others). so the server stay in CLOSE_WAIT state always. But the child process forked by the server has already exit. - Original Message - From: David Schwartz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 17, 2002 5:31 PM Subject: Re: The problem of CLOSE_WAIT On Tue, 17 Sep 2002 17:07:06 +0800, Öܹ⻪ wrote: After few days, on the server side, there are many ssl socket connection did not exit clean, they are mostly in close_wait state and few in established state. Do you understand what the CLOSE_WAIT state means and how sockets get in that state? DS __ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED] __ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED] __ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]
Re: The problem of CLOSE_WAIT
On Tue, 17 Sep 2002 18:26:05 +0800, 周光华 wrote: I think CLOSE_WAIT state means it is still waitting for the other side's FD_CLOSE notification, (perhaps shutdown function of ssl or socket will send this notification), but the other side had already exit and successfully closed the connection, (perhaps it exited with exceptions or it is killed by others). so the server stay in CLOSE_WAIT state always. But the child process forked by the server has already exit. Nope. This is the TIME_WAIT state, which is another animal entirely. See http://tit.irk.ru/tcp_stevens/tcp_conn.htm and RFC1793. The problem is that you did not close the file descriptor after it was cloned by fork. DS __ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]
RE: The problem of CLOSE_WAIT
Your application received a FIN before it issued a CLOSE. Maybe your appl should respond with a CLOSE on the socket (if it is detecting the FIN at all) ? This might be nothing for CLOSE_WAIT is a normal state or it might be that your application is not CLOSING the sockets when the other side is initiating the shutdown (which puts them in CLOSE_WAIT). -Original Message- From: David Schwartz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 17, 2002 5:32 AM To: [EMAIL PROTECTED] Subject: Re: The problem of CLOSE_WAIT On Tue, 17 Sep 2002 17:07:06 +0800, Öܹ⻪ wrote: After few days, on the server side, there are many ssl socket connection did not exit clean, they are mostly in close_wait state and few in established state. Do you understand what the CLOSE_WAIT state means and how sockets get in that state? DS __ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED] __ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]