Potential node.js debug error in WebStorm when handling clusters

I have a project that uses clusters for master/workers - since upgrading to node v4.4.2 - I am having problems debugging that project in webstorm 2016.1 - I am getting the following error message in the console of the master:

 

Error: bind EADDRINUSE null:43517
at Object.exports._errnoException (util.js:870:11)
at exports._exceptionWithHostPort (util.js:893:20)
at cb (net.js:1299:16)
at shared (cluster.js:602:5)
at Worker.<anonymous> (cluster.js:576:9)
at process.<anonymous> (cluster.js:737:8)
at emitTwo (events.js:92:20)

at process.emit (events.js:172:7)

at handleMessage (internal/child_process.js:695:10)
at internal/child_process.js:497:7Debugger listening on port 53998

 

I do not have any require('sys') in my code that I can see.

 

I made sure that in settings node.js reports v4.4.2 - and that I applied the changes after it went over all the npm modules.

 

Not sure if this is a bug in my settings or an issue with WebStorm - please advise.

1 comment

doesn't look related to Webstorm. Most probably the issue is caused by the way child process is forked - it seems to inherit execArgv from the master process, as a result child process runs on same debug port as a main process and fails because the port is already bound. Please inspect you code and make sure to pass a different debug port to child process

0

Please sign in to leave a comment.