Supervisord 不起作用

Supervisord 不起作用

昨天,我重启了用于 OpenEdx 平台的 Ubuntu 16.04 服务器。重启后,我的服务器宕机了。我发现问题出在 Supervisord 不起作用。当我运行此命令时:

sudo service supervisord start 

我认为这个错误:

无法启动supervisord.service:单元supervisord.service已被屏蔽。

当我跑步时:

sudo service supervisor restart

我明白了

由于控制进程以错误代码退出,supervisor.service 的作业失败。有关详细信息,请参阅“systemctl status Supervisor.service”和“journalctl -xe”。

运行这个:systemctl status supervisor.service

Failed to start supervisord.service: Unit supervisord.service is masked.
root@ip-:/# sudo service supervisord startFailed to start supervisord.service: Unit supervisord.service is masked.
supervisord: unrecognized service
root@ip-:/# sudo service supervisor restart
Job for supervisor.service failed because the control process exited with error code. See "systemctl status supervisor.service" and "journalctl -xe" for details.
root@ip-:/# sudo service supervisor restartJob for supervisor.service failed because the control process exited with error code. See "systemctl status supervisor.service" and "journalctl -xe" for details.systemctl status supervisor.service
supervisor: unrecognized service
root@ip-:/# 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 Sat 2018-12-15 14:56:51 UTC; 1min 10s ago
     Docs: http://supervisord.org
  Process: 6546 ExecStart=/edx/app/supervisor/venvs/supervisor/bin/supervisord --configuration /edx/app/supervisor/supervisord.conf (code=exited, status=2)

Dec 15 14:56:51  systemd[1]: Starting supervisord - Supervisor process control system...
Dec 15 14:56:51  supervisord[6546]: Error: Cannot open an HTTP server: socket.error reported errno.EACCES (13)
Dec 15 14:56:51  supervisord[6546]: For help, use /edx/app/supervisor/venvs/supervisor/bin/supervisord -h
Dec 15 14:56:51  systemd[1]: supervisor.service: Control process exited, code=exited status=2
Dec 15 14:56:51  systemd[1]: Failed to start supervisord - Supervisor process control system.
Dec 15 14:56:51  systemd[1]: supervisor.service: Unit entered failed state.
Dec 15 14:56:51  systemd[1]: supervisor.service: Failed with result 'exit-code'.

我正在使用 AWS 作为机器。

答案1

我注意到,如果在 /etc/supervisord.conf 文件中,[include] 标头下有任何 .ini 文件,或者即使标头本身被取消注释,Supervisord 服务也不会运行。

我必须在注释掉此部分时启动该服务,然后一旦它上线,您就可以取消注释并运行:

supervisorctl update
supervisorctl reread
supervisorctl reload

相关内容