-4

I have read other threads regarding sockets in TIME_WAIT, but I am clearly still missing something.

Below is a few lines from a "netstat -an". How could it get into this situation? If I understood the descriptions I found, we should not have more than one instance of the socket 63444 ... but after the one listed as "LISTEN" there are about 50 individual socket connections with one end at 63444, all in "TIME_WAIT". How could this happen, and how can I fix it?

tcp        0      0 0.0.0.0:63444           0.0.0.0:*               LISTEN      
tcp        0      0 169.254.7.228:63444     169.254.66.84:35391     TIME_WAIT   
tcp        0      0 169.254.7.228:63444     169.254.66.84:35283     TIME_WAIT   
tcp        0      0 169.254.7.228:63444     169.254.66.84:35352     TIME_WAIT   
tcp        0      0 169.254.7.228:63444     169.254.66.84:35431     TIME_WAIT
2
  • This is normal TCP behavior. You have one entry per connection. As you can see, the port on the right is different for every one of them. They are different TCP connections.
    – user143703
    Aug 19, 2015 at 22:33
  • 1
    For the same reasons as when you asked this on SO Aug 21, 2015 at 15:41

1 Answer 1

4

TCP connections are not identified by just the local port number. They are identified by the tuple consisting of local IP address, local port number, remote IP address, and remote port number.

Since the remote port number differs, they are different connections.

The socket API has one socket per connection plus one listening socket for accepting incoming connections.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .