node.exe port in use, cannot close task forced to restart PC

So basically I have a Gulp Task that runs with the Gulp Task Runner,  I am using browser sync to monitor file reloads.  It uses the port 3000.    I use to be able to close the task down, kill / restart / etc but now when I do it randomly it will be unable to terminate the node process and it complains about port 3000 being in use.


the second issue is that once that happens I can't goto the task manager and quit node.exe because it says 

"The operation could not be completed.   Acess Denied"


and if i use elevated command prompts or "process hacker" which is a better windows Task Manager it shows this for parent

Non-existent process (6580)

and this was the Gulp task that it started from PhpStorm

"C:\Program Files\nodejs\node.exe" C:\WRG_TFS\Dev\Projects\ClientContent\node_modules\gulp\bin\gulp.js --color --gulpfile C:\WRG_TFS\Dev\Projects\ClientContent\gulpfile.js default


Basically PHPStorm is failing to properly kill that node.exe task leaving it unable to close and a restart is the only way to terminate it.




Error: listen EADDRINUSE :::3000
at Object.exports._errnoException (util.js:1018:11)
at exports._exceptionWithHostPort (util.js:1041:20)
at Server._listen2 (net.js:1258:14)
at listen (net.js:1294:10)
at Server.listen (net.js:1390:5)
at module.exports.plugin (C:\WRG_TFS\Dev\Projects\ClientContent\node_modules\browser-sync\dist\server\index.js:27:25)
at Object.startServer [as fn] (C:\WRG_TFS\Dev\Projects\ClientContent\node_modules\browser-sync\dist\async.js:177:52)
at C:\WRG_TFS\Dev\Projects\ClientContent\node_modules\browser-sync\dist\browser-sync.js:120:14
at iterate (C:\WRG_TFS\Dev\Projects\ClientContent\node_modules\browser-sync\dist\utils.js:253:13)
at C:\WRG_TFS\Dev\Projects\ClientContent\node_modules\browser-sync\dist\utils.js:264:25

Process finished with exit code 1

1 comment

I believe that Phpstorm is unable to terminate the process for just the same reason as you - the process is being locked by some other process, and thus can't be killed... are there any specific steps that lead to the issue? Please try recreating it and provide your idea.log


Please sign in to leave a comment.