LearnBoost / cluster

Node.JS multi-core server manager with plugins support.
http://learnboost.github.com/cluster
MIT License
2.29k stars 159 forks source link

cluster support for windows with node 0.4.5 #80

Open jjoschyy opened 13 years ago

jjoschyy commented 13 years ago

Hello

Using node with express works fine on windows (http://node-js.prcn.co.cc/). Also your cluster lib seems to start right:

C:\Tools\test\Server>node app

info - master started

info - worker 0 spawned

info - worker 1 spawned

info - worker 0 connected

info - worker 1 connected

info - listening for connections

The problem occures (without any error) on connecting to the cluster. A connection is possible (tested with telnet), but without any response. I used the following test-app:

var http = require('http');

var cluster = require('cluster')

var server = http.createServer(function(req, res){

console.log('%s %s', req.method, req.url);

var body = 'Hello World';

res.writeHead(200, { 'Content-Length': body.length });

res.end(body);

});

cluster(server)

.use(cluster.logger('logs'))

.use(cluster.debug())

.listen(80);

Is there any way, to get it working on windows?

Thanks a lot for any help Best regards, Joachim

tj commented 13 years ago

unless you guys have fd passing it may never work on windows

tj commented 13 years ago

as-is at least

steveworkman commented 12 years ago

Hi TJ,

I've not had any luck getting cluster to work with Windows with Node 0.6.15 I get

$ node server.js

node.js:201
        throw e; // process.nextTick error, or 'erro
              ^
TypeError: object is not a function
    at EventEmitter.CALL_NON_FUNCTION (native)
    at Object.<anonymous> (c:\Users\lonsw18\Document
s\Hobnob\App\Hobnob\server.js:4:1)
    at Module._compile (module.js:441:26)
    at Object..js (module.js:459:10)
    at Module.load (module.js:348:31)
    at Function._load (module.js:308:12)
    at Array.0 (module.js:479:10)
    at EventEmitter._tickCallback (node.js:192:40)

Will it ever work on Windows? Thanks in advance

Steve

rex commented 10 years ago

I am not sure, but it seems at first glance like Windows support is baked into the native cluster module in Node 0.10.x. @visionmedia have you got any idea about this?