Find the answer to your Linux question:
Results 1 to 3 of 3
hi, when i do a "netstat -na | grep 9999" it tells me tcp 0 0 localhost:9999 destination:1053 TIME_WAIT As a result I cannot use this port(9999) henceforth even though ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User
    Join Date
    May 2003
    Location
    CA
    Posts
    370

    terminating open ports


    hi,

    when i do a "netstat -na | grep 9999"
    it tells me
    tcp 0 0 localhost:9999 destination:1053 TIME_WAIT

    As a result I cannot use this port(9999) henceforth even though I am not using it, is there a way to just terminate this connection and free up the port? or does it require a hard reboot?

    Thanks,
    Nik

  2. #2
    Linux User
    Join Date
    May 2003
    Location
    CA
    Posts
    370
    hi
    "lsof -i" gives a list of processes associated with particular ports...
    once you kill the process then the port becomes free...

  3. #3
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Ports in the TIME_WAIT state are not associated to a process. They are closed sockets that are waiting to ensure that no packets still linger on the network and confuse programs when they get through. You can check with "netstat -anto | grep 9999" to see the current timeout value.
    Otherwise, to see which process it is that's keeping a socket open, you can check with the -p flag to netstat, which specifies to it to display the associated process.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •