Linux – Port already in use by process that does not exist

linuxportUbuntu

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?

Best Answer

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