I use Supervisor for process control
/etc/supervisor/conf.d/onehomeServer.conf
[program:onehomeServer]
command=sudo /home/fanfei/onehomeServer/env/bin/gunicorn --bind unix:/tmp/www.fanfei.site.socket onehomeServer.asgi:application
directory=/home/fanfei/onehomeServer/ ; cd$
autostart=true ; supervisord
autorestart=true ;
startretries=10 ;
exitcodes=0 ;
stopsignal=KILL ;
stopwaitsecs=10 ; SIGKILL
redirect_stderr=true ; stderrstdout
stdout_logfile=/home/fanfei/onehomeServer/logfile.log ;
; false true stop $
stopasgroup=true ; send stop signal to the UNIX process
; false true kill $
killasgroup=true ; SIGKILL the UNIX process group (def false)
however, when I execute
sudo supervisorctl reload
sudo supervisorctl restart all
After , the website cannot be opened. The log file is as follows:
[2019-02-27 10:32:40 +0800] [1323] [INFO] Starting gunicorn 19.9.0
[2019-02-27 10:32:40 +0800] [1323] [INFO] Listening at: unix:/tmp/www.fanfei.site.socket (1323)
[2019-02-27 10:32:40 +0800] [1323] [INFO] Using worker: sync
[2019-02-27 10:32:40 +0800] [1326] [INFO] Booting worker with pid: 1326
[2019-02-27 10:32:59 +0800] [1337] [INFO] Starting gunicorn 19.9.0
[2019-02-27 10:32:59 +0800] [1337] [INFO] Listening at: unix:/tmp/www.fanfei.site.socket (1337)
[2019-02-27 10:32:59 +0800] [1337] [INFO] Using worker: sync
[2019-02-27 10:32:59 +0800] [1340] [INFO] Booting worker with pid: 1340
if I execute
directly on the command linesudo /home/fanfei/onehomeServer/env/bin/gunicorn --bind unix:/tmp/www.fanfei.site.socket onehomeServer.wsgi:application
website can be opened:
[2019-02-27 09:41:56 +0800] [1143] [INFO] Starting gunicorn 19.9.0
[2019-02-27 09:41:56 +0800] [1143] [INFO] Listening at: unix:/tmp/www.fanfei.site.socket (1143)
[2019-02-27 09:41:56 +0800] [1143] [INFO] Using worker: sync
[2019-02-27 09:41:56 +0800] [1146] [INFO] Booting worker with pid: 1146
^C[2019-02-27 09:42:42 +0800] [1143] [INFO] Handling signal: int
[2019-02-27 09:42:42 +0800] [1146] [INFO] Worker exiting (pid: 1146)
[2019-02-27 09:42:43 +0800] [1143] [INFO] Shutting down: Master
where is the problem, please?