I've searched a lot and I understand there is some process or server running on port 3000, but how can I stop that and run a new express http server on port 3000. There are few answers which tell it for Unix environment..but how to release the port on windows environment using cmd terminal. Closing the task using PID also didn't work for me. Thanks in advance
5 Answers
Open the command prompt and type the following
netstat -a -o -n run down the list by port until you find port 3000 and you will see the process id. Then run
taskkill /F /PID (yourprocessID) there's another simple way to do this in a single command
FOR /F "tokens=4 delims= " %%P IN ('netstat -a -n -o ^| findstr :3000') DO TaskKill.exe /PID %%P if you use windows 7 U might need tokens=5, use with caution tokens are different for different OS.
4 Comments
- In windows 10, open task manager and go to
Detailstab. - There you will find
node.exerunning. - End that task and your port will be released.
3 Comments
EADDRINUSE means there is already another running process that is listening to the port your node app wants to use and has it reserved. It's most likely you've run the app previously but it hasn't terminated properly and is still holding on to the port. so first we terminate already running one,then only start another new one server