このチュートリアルを 2 回実行しましたが、実行した 2 番目のマシンでスーパーバイザー実行の gunicorn エラーが発生しました。スーパーバイザーに次のコマンドを使用して Gunicorn を起動するように指示すると、次のようになります。
$ 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 python の実行と同じ:
$ /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