TechArena Community

TechArena Community (http://forums.techarena.in/)
-   Networking & Security (http://forums.techarena.in/networking-security/)
-   -   Is there any way to clear CLOSE_WAIT state of a TCP connection (http://forums.techarena.in/networking-security/1447222.htm)

Vj@y.Deenanath 30-12-2011 05:27 AM

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.

Zared 30-12-2011 05:28 AM

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.

Jugo 30-12-2011 05:29 AM

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 -- -.

Captain Samuel Salt 30-12-2011 05:29 AM

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.

Bhuvana21 30-12-2011 05:30 AM

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.

Triple H 30-12-2011 05:31 AM

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?

Reese-R 30-12-2011 05:31 AM

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)


All times are GMT +5.5. The time now is 06:37 AM.