Results 1 to 7 of 7

Thread: Is there any way to clear CLOSE_WAIT state of a TCP connection

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

  2. #2
    Join Date
    Nov 2010
    Posts
    445

    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.

  3. #3
    Join Date
    Mar 2011
    Posts
    466

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

  4. #4
    Join Date
    Mar 2011
    Posts
    442

    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.

  5. #5
    Join Date
    May 2011
    Posts
    460

    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.

  6. #6
    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?

  7. #7
    Join Date
    May 2011
    Posts
    428

    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)

Similar Threads

  1. Replies: 1
    Last Post: 06-07-2011, 07:43 AM
  2. Replies: 3
    Last Post: 31-07-2009, 01:09 PM
  3. Sqlconnection state in C#.Net
    By Aramax in forum Windows Software
    Replies: 1
    Last Post: 08-06-2009, 11:47 PM
  4. Bluetooth mouse looses connection after Vista sleep state
    By aileen in forum Vista Hardware Devices
    Replies: 3
    Last Post: 19-01-2009, 09:42 PM
  5. Replies: 4
    Last Post: 26-11-2008, 01:41 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,719,318.27539 seconds with 17 queries