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?

  • 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 serverfault.com/questions/329845/… – tdelaney Jun 25 '17 at 16:36

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.