我跟着this tutorial两次,但在第二台运行它的机器上,我得到了一个监督者运行的gunicorn错误。当我告诉上司启动gunicorn使用:Gunicorn Supervisor启动错误
$ sudo supervisorctl start gunicorn
gunicorn: ERROR (abnormal termination)
的gunicorn_err.log重复这个:
Unknown command: 'run_gunicorn'
Type 'manage.py help' for usage.
监督员的配置是这样的:
[program:gunicorn]
command=/home/ubuntu/.virtualenvs/<VIRTUALENV>/bin/python /home/ubuntu/<APPNAME>/manage.py run_gunicorn -w 4 -k gevent
directory=/home/ubuntu/<APPNAME>
user=www-data
autostart=true
autorestart=true
stdout_logfile = /var/log/supervisor/gunicorn.log
stderr_logfile = /var/log/supervisor/gunicorn_err.log
的gunicorn.log是空的。我已经尝试将用户更改为ubuntu并在没有virtualenv的情况下运行(我的'默认'python环境也准备好了,因为它具有所有先决条件包。)我甚至尝试删除gunicorn中变量赋值之间的空格。 CONF 其实如果我手动运行:
$ /usr/bin/python /home/ubuntu/<APPNAME>/manage.py run_gunicorn -w 4 -k gevent
2013-01-22 19:20:33 [1231] [INFO] Starting gunicorn 0.17.2
2013-01-22 19:20:33 [1231] [INFO] Listening at: http://127.0.0.1:8000 (1231)
2013-01-22 19:20:33 [1231] [INFO] Using worker: gevent
2013-01-22 19:20:33 [1236] [INFO] Booting worker with pid: 1236
2013-01-22 19:20:33 [1237] [INFO] Booting worker with pid: 1237
2013-01-22 19:20:33 [1238] [INFO] Booting worker with pid: 1238
2013-01-22 19:20:33 [1239] [INFO] Booting worker with pid: 1239
而且同样用的virtualenv蟒蛇运行:
$ /home/ubuntu/.virtualenvs/<VIRTUALENV>/bin/python /home/ubuntu/<APPNAME>/manage.py run_gunicorn -w 4 -k gevent
2013-01-22 19:21:53 [1246] [INFO] Starting gunicorn 0.17.2
2013-01-22 19:21:53 [1246] [INFO] Listening at: http://127.0.0.1:8000 (1246)
2013-01-22 19:21:53 [1246] [INFO] Using worker: gevent
2013-01-22 19:21:53 [1251] [INFO] Booting worker with pid: 1251
2013-01-22 19:21:53 [1252] [INFO] Booting worker with pid: 1252
2013-01-22 19:21:53 [1253] [INFO] Booting worker with pid: 1253
2013-01-22 19:21:53 [1254] [INFO] Booting worker with pid: 1254
这怎么可能是上司发起gunicorn不能当我找到“run_gunicorn”命令可以运行它使用任何python环境,它的工作原理?是的'gunicorn'
,在INSTALLED_APPS