Supervisor 3.3 与 Ubuntu 16.04 服务启动失败 [英] Supervisor 3.3 with Ubuntu 16.04 service start failure

查看:51
本文介绍了Supervisor 3.3 与 Ubuntu 16.04 服务启动失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天早上,我通过使用升级了我的主管

This morning, I have upgrade my supervisor by using

pip install --upgrade supervisor //from 3.2 to 3.3

但在那之后,服务状态通知它启动失败.

But after that, service status notice it failure start.

supervisor.service - Supervisor process control system for UNIX
Loaded: loaded (/lib/systemd/system/supervisor.service; disabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Tue 2016-05-24 12:19:48 CST; 25s ago
Docs: http://supervisord.org
Process: 27369 ExecStop=/usr/bin/supervisorctl $OPTIONS shutdown (code=exited, status=203/EXEC)
Process: 27366 ExecStart=/usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf (code=exited, status=203/EXEC)
Main PID: 27366 (code=exited, status=203/EXEC)

May 24 12:19:48 709101111291e5cZ systemd[1]: supervisor.service: Unit entered failed state.
May 24 12:19:48 709101111291e5cZ systemd[1]: supervisor.service: Failed with result 'exit-code'.

这是我的工作人员配置:

This is my worker config:

[program:worker]
process_name=%(program_name)s_%(process_num)02d
command=php artisan queue:listen --timeout=360 --queue=high,low --sleep=3 --tries=3
autostart=true
autorestart=true
exitcodes=0,2
user=www
numprocs=2
redirect_stderr=true
stdout_logfile=/www/worker/storage/logs/worker.log

请问有人可以帮忙吗?

推荐答案

我通过编辑 /lib/systemd/system/supervisor.service 解决问题,最好使用命令 install supervisor easy_install supervisor

I fix the problem by edit /lib/systemd/system/supervisor.service, and best to use command install supervisor easy_install supervisor

[Unit]
Description=Supervisord Service

[Service]
ExecStart=/usr/local/bin/supervisord -n -c /etc/supervisor/supervisord.conf
ExecStop=/usr/local/bin/supervisorctl $OPTIONS shutdown
ExecReload=/usr/local/bin/supervisorctl -c /etc/supervisor/supervisord.conf $OPTIONS reload
KillMode=process
Restart=on-failure
RestartSec=50s


[Install]
WantedBy=multi-user.target

supervisord 的路径默认设置是错误的,是/usr/bin.但是 pip install 会将它放在/usr/local/bin 中.

The path of supervisord was wrong in default setting, it was /usr/bin. but pip install will put it in /usr/local/bin.

这篇关于Supervisor 3.3 与 Ubuntu 16.04 服务启动失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆