running node.js server using upstart causes 'terminated with status 127' on 'ubuntu 10.04'

时光怂恿深爱的人放手 提交于 2019-11-29 14:04:37
StuR

127 in bash means: "command not found", illegal_command, possible problem with $PATH or a typo.

Source: http://tldp.org/LDP/abs/html/exitcodes.html

This might be a question for server fault, as it is bash related, but this question / answer might help you:

https://serverfault.com/questions/277706/cron-fails-with-exit-status-127

Had the same error messages, tracked it down in custom upstart log that failed with /usr/bin/env: node: No such file or directory, this was my fix:

https://github.com/joyent/node/issues/3911

Had this issue. I am deploying web app with gunicorn in ubuntu server 14.04. Move your core instructions to a bash script. And remember to make the script executable. I had neglected to make the bash script executable and so I was getting the 127.

description "Gunicorn  app running myproject"

start on runlevel [2345]
stop on runlevel [!2345]

respawn

setuid <user> 
setgid <group>

exec bash /path/to/bash/script/

then my bash script

#!/bin/bash
# description "bash script that handles loading env and running gunicorn"

# load up the project's virtualenv 
source /path/to/virtualenv/bin/activate

# minimal settings 
exec gunicorn app:app 
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!