Re: Cannot connect
Posted in 1999
Topics: Networking & sqlhosts Configuration
If you mean that a process is still bound to the port then all you can do = is wait for the port to timeout, you can check this by seeing what state = the port is in, hopefully a FIN_WAIT or FIN_WAIT_2. It's normal for = connections to end up in FIN_WAIT_2 when the server is killed. (A good = server catches termination signals and cleans up its connections, and a = good sysadmin doesn't kill such a server with SIGKILL, so this problem = shouldn't exist. But we can't count on such being the case.) According to = the TCP/IP spec a connection in FIN_WAIT_2 that was owned by an application= that's gone away will never transition to another state. However, many = implementations terminate FIN_WAIT_2 connections that were fully closed = locally after 10 minutes and 75 seconds, which is what you're seeing.=20 A sockets-based TCP server should always set SO_REUSEADDR on the master = socket before calling bind, so that it can bind again if there are = residual connections in FIN_WAIT_2 or CLOSE_WAIT or whatever. This is = probably one of two the most common TCP sockets programming errors. The = other is setting SO_LINGER off, which you should never do.=20 If you want to cross reference the port user to a process then you need = to download lsof - this can be found in numerous places. Paul Watson WF Software Ltd Tel +44 1436 674729 Fax +44 1436 678729 www.wfsoftware.co.uk >>> Steve Romankiw <sromankiw@execrisk.com> 06/28/99 04:15pm >>> I have a instance that failed. When it failed, if left a connection to the port. The only way I know how to clear this problem is by recycling the machine. Not always a good option! Do you know of way to clear this connection without rebooting the server? Environment: IDS v7.30.UC6 Solaris 2.6 Ultra Enterprise 4000 Thanks. Steve Romankiw ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **********************************************************************