LearnBoost / up

Zero-downtime reloads and requests load balancer based on distribute.
540 stars 73 forks source link

Fails when starting using upstart #18

Closed jackmoore closed 12 years ago

jackmoore commented 12 years ago

When I start up manually, it works perfect. When I try to start with with upstart it fails with the following output:

up-cli starting cluster with 1 workers on port 3000
  up-cli `kill -s SIGUSR2 864` or ctrl + r to load new code
  up spawning 1 workers from master 864
  up worker 867 created
AssertionError: stdin must be initialized before calling setRawMode
    at Object.setRawMode (tty.js:37:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/up/bin/up:164:5)
    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)

And here is my upstart script:

start on startup
stop on shutdown

script
    exec /usr/local/bin/up /home/jack/web/app.js >> /var/log/up.log 2>&1
end script
jackmoore commented 12 years ago

This commit resolved my issue: https://github.com/LearnBoost/up/commit/3ee3754887c43791b2db42b614d65837b7633647