Sekrab Garage

Find task occupying port and kill in windows cmd

Fix address already in use when port is busy

Tip March 1, 21
Subscribe to Sekrab Parts newsletter.

Ever ran into "address already in use" when you know you terminated the task on a specific port? A problem in windows that occupies the port and does not release it automatically, to kill the task and free the port, do the following:

Open `cmd`

Get task PID:

netstat -ano | findstr :<PORT>

Kill it:

taskkill /PID <Task ID> /F