LearnBoost / cluster

Node.JS multi-core server manager with plugins support.

Home Page:http://learnboost.github.com/cluster

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

stream not writable - MacOS Lion

lholden opened this issue · comments

Error in unix_dgram bind of /Users/lori/Projects/confab/cluster.8133.server.sock
Error: stream not writable
at [object Object].write (fs.js:1065:11)
at EventEmitter.log (/Users/lori/Projects/confab/node_modules/cluster/node_modules/log/lib/log.js:152:19)
at EventEmitter.info (/Users/lori/Projects/confab/node_modules/cluster/node_modules/log/lib/log.js:235:10)
at Master. (/Users/lori/Projects/confab/node_modules/cluster/lib/plugins/logger.js:55:11)
at Master.emit (events.js:81:20)
at Socket. (/Users/lori/Projects/confab/node_modules/cluster/lib/master.js:329:10)
at Socket.emit (events.js:61:17)
at dgram.js:127:16

srwxr-xr-x 1 lori staff 0 Jul 27 23:34 cluster.8133.server.sock

Works just fine under Fedora 15 but does this under MacOS Lion with the same code

interesting, i'll look into it

any more info? after a restart etc? or just the initial run?

I started getting this tonight on one of my Ubuntu servers. One app works, the other doesn't. Just throws this and hangs.

This error completely locked that app up, only a full machine restart would fix it..

SIGKILL should do the trick but yeah that's not good, I can't reproduce it on snow leopard but tomorrow I'll try our server

It's not that, I can kill the process at this point. I just can't get
it to start again. I've killed all node processes, cleared the socks
from tmp, killed all the pids. It was still suck in this state. Only a
hard reset of the machine fixed it.

It may have something to do with mem management. This is our staging
server which restarts the procs every hour. Maybe we should kill then
fresh start instead if a restart. Our stage machine is a Rackspace
cloud machine with only 512MB of ram & only ~50MB free.

Sent from my iPhone

On Jul 28, 2011, at 9:15 PM, visionmedia
reply@reply.github.com
wrote:

SIGKILL should do the trick but yeah that's not good, I can't reproduce it on snow leopard but tomorrow I'll try our server

Reply to this email directly or view it on GitHub:
#135 (comment)

oh i see.. wtf... lots of madness seems to have occurred after switching to UDP for IPC if I don't resolved a few of these tomorrow when I take a closer look I'll revert to TCP for now

I'm getting this on test/test.restart.js... sometimes haha. yay

wait a minute, you have two errors haha. one for the log file and one for the dgram bind

For me... its the initial run on that machine. I will have to look tonight
when I can go through the code; but maybe the forked processes are holding
onto the server socket?

hi.
probably was set wrong path to store log files
example:
.use(cluster.logger(__dirname + 'sys/logs')) - throw error
.use(cluster.logger(__dirname + '/sys/logs')) - all ok ; )

Probably this will be some help !

On Ubuntu 10.10, I am getting the same error. Here is the code, https://gist.github.com/1139060. NOTE : Just .listen()ing to it without any other settings works !!!

Also, seeing these errors,

  1. I did git clone and tested few examples which are working fine. e.g basic.js and repl.js.
  2. Then I copied repl.js to repl1.js and run it (in the same folder). No surprise, run well.
  3. Moved the repl1.js to parent folder and tried running it, and there you have it again, the same error.

Also, I have tried it with 'sudo' command, and as expected it has not changed the results described.

Finally, creating those directories "logs" and "pids" does the trick !!!

I added mkdir -p ish support for pidfiles and logger so it should be resolved now like @samyakbhuta mentions, closing for now please reopen if it's not resolved for you