【发布时间】:2018-02-25 22:59:37
【问题描述】:
我第一次尝试在 Digital Ocean Ubuntu 16.04 服务器上使用 NGINIX、Gunicorn 和 Supervisor 部署 Django Web 应用程序。我正在关注this linked tutorial。
我在配置 Supervisor 时遇到问题。运行此命令时...
sudo supervisorctl status automatedre
我收到此错误...
automatedre FATAL Exited too quickly (process log may have details)
日志文件显示了这个...
supervisor: couldn't exec /home/automatedre/gunicorn_start: ENOENT
supervisor: child process was not spawned
supervisor: couldn't exec /home/automatedre/gunicorn_start: ENOENT
supervisor: child process was not spawned
/home/automatedre/gunicorn_start
#!/bin/bash
NAME="django_automatedre"
DIR=/home/automatedre/automatedre
USER=automatedre
GROUP=automatedre
WORKERS=3
BIND=unix:/home/automatedre/run/gunicorn.sock
DJANGO_SETTINGS_MODULE=automatedre.settings
DJANGO_WSGI_MODULE=automatedre.wsgi
LOG_LEVEL=error
cd $DIR
source ../venv/bin/activate
export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE
export PYTHONPATH=$DIR:$PYTHONPATH
exec ../venv/bin/gunicorn ${DJANGO_WSGI_MODULE}:application \
--name $NAME \
--workers $WORKERS \
--user=$USER \
--group=$GROUP \
--bind=$BIND \
--log-level=$LOG_LEVEL \
--log-file=-
/etc/supervisor/conf.d/automatedre.conf
[program:automatedre]
command=/home/automatedre/gunicorn_start
user=automatedre
autostart=true
autorestart=true
redirect_stderr=true
stdout_logfile=/home/automatedre/logs/gunicorn.log
我不知道从这里去哪里。我不认为这是文件权限问题,因为我之前用这个更改了 gunicorn_start 的权限...
chmod u+x gunicorn_start
关于我哪里出错了有什么想法吗?
【问题讨论】:
标签: django gunicorn supervisord