To kill a process listening on a port:
This command should list processes listening on all ports:
netstat -ano
The -o option will display the process id.
If you’re using a *nix system, you can refine a little further with:
netstat -ano | grep <badport>
When you have the process id, you can terminate it with:
Windows:
- Open Task Manager, add the PID column with View > Select Columns > PID
- Find the process and right-click to kill it
Others:
kill <PID>