I am using node.js and using the cluster module. Every time I run cluster.fork (), I always get
throw er; // Unhandled 'error' event Error: bind EADDRINUSE at exports._errnoException (util.js:746:11) at cb (net.js:1205:33) at rr (cluster.js:592:14) at Worker.<anonymous> (cluster.js:563:9) at process.<anonymous> (cluster.js:692:8) at process.emit (events.js:129:20) at handleMessage (child_process.js:324:10) at Pipe.channel.onread (child_process.js:352:11)
I was looking for this, and I have no idea how this happens because I am not transmitting the port numbers.
thanks
EDIT: Code Posting
var setupWorkers = function() { if (cluster.isMaster) {
and this is the function that is called in app.js that I run by calling node app.js
Gakho source share