为什么主管退出并出现ENOENT错误?

时间:2019-05-05 05:25:52

标签: flask gunicorn supervisord supervisor

我正在尝试使用主管来监视/控制由nginx和gunicorn提供的烧瓶应用程序。当我运行sudo administratorctl reload时,我得到了错误的网关502页面。我的错误日志显示为“无法chdir到/ home / beng /我的高级项目:ENOENT主管:未生成子进程”

我已经对我的seniorproject.conf文件尝试了许多不同的调整,其中包含了我希望主管运行的过程,但最终还是遇到了上述相同的错误。

seniorproject.conf文件(包含在supervisord.conf文件中):

[program:seniorproject]
directory="/home/beng/My Senior Project"
command="/home/beng/My Senior Project/venv/bin/gunicorn" -w 3 run:app
user=beng
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
stderr_logfile=/var/log/seniorproject/seniorproject.err.log
stdout_logfile=/var/log/seniorproject/seniorproject.out.log

supervisord.conf文件:

; supervisor config file

[unix_http_server]
file=/var/run/supervisor.sock   ; (the path to the socket file)
chmod=0700                       ; sockef file mode (default 0700)

[supervisord]
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor            ; ('AUTO' child log dir, default $TEMP)

; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
; added by defining them in separate rpcinterface: sections
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL  for a unix socket

; The [include] section can just contain the "files" setting.  This
; setting can list multiple files (separated by whitespace or
; newlines).  It can also contain wildcards.  The filenames are
; interpreted as relative to this file.  Included files *cannot*
; include files themselves.

[include]
files = /etc/supervisor/conf.d/*.conf

我希望主管成功运行gunicorn命令,以便即使关闭了终端,访问我的ip地址也可以成功启动我的网站。

0 个答案:

没有答案