Why there are many 'CLOSE_WAIT' sockets seen in "netstat" command output ?

Solution Verified - Updated -

Issue

  • When running netstat command there are many CLOSE_WAIT state sockets.
  • These sockets are seen in this state even after the time defined in `net.ipv4.tcp_keepalive_time' more than 2 hours which is the default of TCP connection timeout.
# netstat -a | grep local
       *.local                  *.*              0      0     0      0 LISTEN
hostname.local         hostname.774           5840      0 10124      0 CLOSE_WAIT
hostname.local         hostname.638           5840      0 10124      0 CLOSE_WAIT
hostname.local         hostname.818           5840      0 10124      0 CLOSE_WAIT
hostname.local         hostname.782           5840      0 10124      0 CLOSE_WAIT

Environment

  • Red Hat Enterprise Linux
  • TCP/IP networking

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content