我尝试过:
sudo service supervisor restart
我得到了:
supervisor.service 作业失败,因为控制进程退出并出现错误代码。有关详细信息,请参阅“systemctl status Supervisor.service”和“journalctl -xe”。
然后我跑:
systemctl status supervisor.service
结果:
supervisor.service - supervisord - Supervisor process control system
Loaded: loaded (/etc/systemd/system/supervisor.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2018-04-29 13:37:02 EDT; 27s ago
Docs: http://supervisord.org
Process: 23929 ExecStart=/edx/app/supervisor/venvs/supervisor/bin/supervisord --configuration /edx/ap
Apr 29 13:37:02 vu supervisord[23929]: handlers.append(RotatingFileHandler(filename,'a',maxbytes,ba
Apr 29 13:37:02 vu supervisord[23929]: File "/edx/app/supervisor/venvs/supervisor/local/lib/python2.7
Apr 29 13:37:02 vu supervisord[23929]: FileHandler.__init__(self, filename, mode)
Apr 29 13:37:02 vu supervisord[23929]: File "/edx/app/supervisor/venvs/supervisor/local/lib/python2.7
Apr 29 13:37:02 vu supervisord[23929]: self.stream = open(filename, mode)
Apr 29 13:37:02 vu supervisord[23929]: IOError: [Errno 13] Permission denied: '/edx/var/log/supervisor/
Apr 29 13:37:02 vu systemd[1]: supervisor.service: Control process exited, code=exited status=1
Apr 29 13:37:02 vu systemd[1]: Failed to start supervisord - Supervisor process control system.
Apr 29 13:37:02 vu systemd[1]: supervisor.service: Unit entered failed state.
Apr 29 13:37:02 vu systemd[1]: supervisor.service: Failed with result 'exit-code'.
步骤:
/etc/supervisor/conf.d
sudo service supervisor restart
重新启动 Supervisor。/etc/supervisor/conf.d/
目录sudo supervisorctl reread
它将检查语法并将进程添加到主管组。如果不起作用,请卸载并重新安装 Supervisor。
关键错误消息是这个:
Permission denied: '/edx/var/log/supervisor/
supervisord 无权登录 /edx/var/log/supervisor/ 目录。检查该目录是否存在以及运行supervisord的用户是否可以写入该目录。