4

Trying to run service that uses port results in error

Port 20102 is already being used by another process (pid: 821)

Though process is not active: ps ax | grep 821 gives nothing

netstat -a | grep 20102 gives nothing as well

How is it possible and what can be done?

AdamSkywalker
  • 141
  • 1
  • 1
  • 4
  • 1
    It sounds like the socket is in timed-wait. Was 821 active recently and does the problem go away after a few more minutes? if so, this answer covers the problem well https://serverfault.com/questions/329845/how-to-forcibly-close-a-socket-in-time-wait – tdelaney Jun 25 '17 at 16:36

1 Answers1

5

Try change you netstat arguments for

netstat -ntupl | grep :20102

And use the command for check process in use

lsof -i :20102

The manual of netstat, on -a argument say: All, but this is not true always

CorTheZ
  • 63
  • 1
  • 5