Closed kof closed 13 years ago
interesting, I am on osx as well, and everything is fine. looking into it
which version of node? I will grab the same, currently tested with 0.2.6 and 0.4.0
It is in the description, 0.4.0 :)
the interesting thing is that even your examples doesn't work, so there is no dependency on my code
strannnnge.. looks like the fd passing is possibly failing
hmm can this depend on any OS configuration, f.e. ssl etc. ?
more info:
it breaks after .listen() call.
manpage says you get EINVAL when the socket is already connected
wait I restart my mashine ....
in node's source looks like its coming from the bind() call not listen()
[EINVAL] socket is already bound to an address and the protocol does not support binding to a new address. Alternatively, socket may have been shut down.
restart didn't help :)
I mean .listen method from cluster, if I remove listen no error happens
I tried to debug and landed in .start() in // TCP server for IPC this._server.listen(this.options['socket path'], function(){
the callback is never called
ohh interesting it's the IPC socket, try .set('socket path', '/tmp/cluster.sock')
ok has worked ... it this a permission error for sock file?
could be, I was going to default it to /var/run/cluster.sock but that will certainly have permission issues, I wanted to have it useable out of the box without sudo, but your system does not like something
node needs a crossplattform tmp dir without permission issues. I have had the same issue in my node-qunit module because of jscoverage
I have already started a thread about tmp dir in nodejs-dev for a long time, but nothing changed
yeah we do need a path or mktemp() or something. strange though that it would not work in the same directory as your repo, and I would expect something else not EINVAL
I can do any tests you neeed to fugure out exactly what wrong
can you ls -l
the cloned repo? by default it should be trying to create that socket at ./cluster.sock
, maybe the path is not setting correctly in Master#resolve()
there is no sock file in the same dir, I have done console .log in master#start method
console.log(this.options['socket path']);
the path is correct:
/Users/kof/work/javascript/nodejs/libs/cluster/examples/master.sock
ah, yeah that looks correct, I resolve relative to the script instead of the CWD. permissions could be off, I will clone and see if mine is fine out of the box
the strange thing is I had the same problem if use it from npm, but I thought this has something todo with my code.
now I have tried basic.js from examples and require cluster from npm - the same shit
wtf lol I have to run to the chiropractor right away but I will try and reproduce some more when I get back
doing a decent refactor, not sure if it will help with your case though
going to close until we have more info, or others report the same issue, then hopefully we can pin-point the cause
I also have this situation. My problem was because I run code on mounted directory (folder from Virtual Box driver). So this file system have not permission for create socket file on it. So i just add as @visionmedia said
cl.set('socket path', '/tmp/')
and all work :)
I didn't have mounted dir and I am wondering why not everybody has the same issue
seems a bit odd to not have permission in the script's directory. @kof definitely ls -la
and check those permission bits
doesn't matter what I trying to do, I get always this
now using node v0.4.0, on macos.
I have tried your examples and to run tests, nothing worked, always with the same error.