Closed dwest-ee closed 8 years ago
Something to do with https://github.com/joyent/node/pull/6917 ?
Hmm, I'm unable to reproduce this. Do you have a test case?
//cluster.js var cluster = recluster(path.join(__dirname, './server.js'), { workers: numCPUs, readyWhen: 'listening' }); process.on('SIGUSR2', reload); process.on('SIGTERM', stop); cluster.on('ready', ready); cluster.run();
//server.js var server = app.listen(); server.on('close', stop); process.on('SIGTERM', stop);
I'm having the same issue. Interestingly I'm only able to reproduce on an amazon linux instance. When I copy the same node binary and project over to my laptop (running ubuntu) it doesn't happen.
Ok, amazon linux instance was a red herring. When running in ec2 I had syslog logging (via ain2) turned on in my app, but not when running locally. When I turn it on locally I can reproduce every time. I'll have another look at this tomorrow if I get time.
I've traced my issue down to this line in ain2:
// HACK: On Node v0.11.x bind the socket to ensure that it works when clustering
// THis should be a temporary fix until node fixes the cluster module
if (/^v0\.11\..*$/.test(process.version)) {
If I change the regex to match .12 then it works.
I'll open a bug on ain2. @dwest-ee maybe you want to check your other dependencies to make sure one of them isn't in conflict with cluster in 0.12
Thanks @seangarner. Will do, I've moved over to iojs 1.2.0 for the time being.
Did this turn out to be a bug in ain2
?
ain2 is not a dependency here; but perhaps it's a different module causing the issue for me.
This should be okay now, but feel free to (re)open if the issue persists.
hi,
Throws the following since Node v0.12.0
assert.js:86 throw new assert.AssertionError({ ^ AssertionError: false == true at SharedHandle.add (cluster.js:97:3) at queryServer (cluster.js:480:12) at Worker.onmessage (cluster.js:438:7) at ChildProcess. (cluster.js:692:8)
at ChildProcess.emit (events.js:129:20)
at handleMessage (child_process.js:324:10)
at Pipe.channel.onread (child_process.js:352:11)