Go Back   TechArena Community > Technology > Networking & Security
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 30-12-2011
Member
 
Join Date: Nov 2011
Posts: 27
Is there any way to clear CLOSE_WAIT state of a TCP connection

I have a SLES machine that accumulates TCP connections in a CLOSE_WAIT state for what seems like forever. These descriptors then stuck all available memory. At the time, I have 3037 of them, but it was much higher before a hastily-RELOAD recently. What is interesting is that they are not connected to local ports that I expect may have processes listening. They have no associated PID, and timers seem to have expired. anyone have any idea how can i clear CLOSE_WAIT state in this case.
Reply With Quote
  #2  
Old 30-12-2011
Member
 
Join Date: Nov 2010
Posts: 442
Re: Is there any way to clear CLOSE_WAIT state of a TCP connection

I am not a black-belt when it comes to TCP stack, or networking core, but the TCP config seems reasonable, since these values are default, the main page:

Code:
# cat /proc/sys/net/ipv4/tcp_fin_timeout 60
If the timer has expired, the battery should, it not automatically clear this substance. I actually give a DOS long term for these things add up.
Reply With Quote
  #3  
Old 30-12-2011
Member
 
Join Date: Mar 2011
Posts: 464
Re: Is there any way to clear CLOSE_WAIT state of a TCP connection

Waiting close indicates that the client closes the connection but the application has not yet closed, or the client is should not identify what programs have this problem. Test using the netstat - tonp 2>&1 | le determine which programs hold as connections. If there is no program, then the service is provided by the kernel. These are likely RPC services such as NFS or rpc.lockd. services can be listed with the netstat - le lntp 2>&1 | grep -- -.
Reply With Quote
  #4  
Old 30-12-2011
Member
 
Join Date: Mar 2011
Posts: 440
Re: Is there any way to clear CLOSE_WAIT state of a TCP connection

Unless the RPC services were related to fixed ports, they bind to the port connections as suggest. You may also want to check the processes and built on the other server. You may be able to link your NFS services to fixed ports by doing the following: Choose four unused ports for NFS Add fixed ports (32763-32766 used here), for the NFS /etc/services.
Reply With Quote
  #5  
Old 30-12-2011
Member
 
Join Date: May 2011
Posts: 459
Re: Is there any way to clear CLOSE_WAIT state of a TCP connection

Code:
rpc.statd 32763-bc / udp # statd issue of CPR
     rpc.statd 32763-bc / tcp
     rpc.statd 32764 / udp # statd CPR listen
     rpc.statd 32764 / tcp
     rpc.mountd 32765 / udp # mountd RPC
     rpc.mountd 32765 / tcp
     rpc.lockd 32766 / udp # RPC lockd / nlockmgr
     rpc.lockd 32766 / tcp

Configure the statd to use options --port 32763 --sortant-port 32764. Configure rpcmountd to use the - `port 32765 - stop Services NFS and RPC recovery.
Reply With Quote
  #6  
Old 30-12-2011
Member
 
Join Date: Nov 2011
Posts: 30
Re: Is there any way to clear CLOSE_WAIT state of a TCP connection

this is actually something new for me, so i just want simple solution for this. how can i clear CLOSE_WAIT state of a TCP connection? How long a wait or close the demolition process will take, can we control under Linux (not only Debian) via a kernel variable?
Reply With Quote
  #7  
Old 30-12-2011
Member
 
Join Date: May 2011
Posts: 424
Re: Is there any way to clear CLOSE_WAIT state of a TCP connection

No, there is no timeout for CLOSE_WAIT. I think that is what it means in your production. To break CLOSE_WAIT , the application must explicitly close the socket (or output). See how to break CLOSE_WAIT .

If -netstat shows in the column of processes:

are you running with the privileges and capabilities appropriate (such as root)?
they may be core processes (eg nfsd)
Reply With Quote
Reply

  TechArena Community > Technology > Networking & Security
Tags: , , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Is there any way to clear CLOSE_WAIT state of a TCP connection"
Thread Thread Starter Forum Replies Last Post
only wireless connection and no ethernet connection in network connection honda91 Operating Systems 1 06-07-2011 07:43 AM
FTP problem - unable to make the session state request to the session state server. Benito Software Development 3 31-07-2009 01:09 PM
Sqlconnection state in C#.Net Aramax Windows Software 1 08-06-2009 11:47 PM
Bluetooth mouse looses connection after Vista sleep state aileen Vista Hardware Devices 3 19-01-2009 09:42 PM
Nortel and India's Chhattisgarh State Enhance State - Wide Communications With WiMAX Broad-Man India BroadBand 4 26-11-2008 01:41 PM


All times are GMT +5.5. The time now is 02:46 PM.