今天早上,我使用
升级了我的主管'\u002e'
但在此之后,服务状态会发现它失败了。
pip install --upgrade supervisor //from 3.2 to 3.3
这是我的工作人员配置:
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'.
请有人帮忙吗?
答案 0 :(得分:18)
我使用Supervisor 3.2在Ubuntu 16.04上,当我尝试启动服务主管启动主管时出现同样的错误。
我使用apt-get install supervisor
来安装主管,它将supervisorctl和supervisord放在/usr/bin/
中。
我的supervisor.service
文件指向/usr/bin/
。我被卡住了。
UPDATE
我发现了问题,结果发现/etc/supervisor/conf.d/
中的一个.conf文件中存在解析错误。一旦我修复它工作。这个错误一点也不清楚,但有关于如何找到它的暗示。在原始错误输出中有一行像
ExecStart=/usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf (code=exited, status=203/EXEC)
从命令行运行/usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf
,它会给你一个更详细的错误。
答案 1 :(得分:7)
我通过编辑/lib/systemd/system/supervisor.service
来解决问题,最好使用命令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。
答案 2 :(得分:1)
我遇到了一个类似的问题,我得到一个status = 2作为退出代码。关于可能出现的问题没有进一步的线索。
事实证明,如果主管的日志文件夹不存在,Supervisor就不会启动。由于此文件夹已安装在tmpfs上,因此在重新启动设备后,它将再次被擦除。
这导致Supervisor无法启动(已知问题:https://github.com/Supervisor/supervisor/issues/121)
作为修复,我在启动脚本中添加了以下行:
mkdir /var/log/supervisor
sudo service supervisor restart
现在文件夹在启动时创建,主管正确启动。
答案 3 :(得分:1)
我不知道如何在Ubuntu中启动服务,即使它具有/lib/systemd/system/supervisor.service
和配置权限。但当你service supervisor start
加载蒙版时。
我使用提示,apt install supervisor
和easy_install supervisor
,然后是easy_install -U supervisor
。现在,它有两个不同的版本,
/usr/local/bin/supervisord --version // Version 3.3.3 until 26th,Jan,2018
/usr/bin/supervisord --version // Version 3.2.0 Ubuntu 16.04
之后,修改/lib/systemd/system/supervisor.service
和/etc/init.d/supervisor
,将所有/usr/bin/supervisord
更改为/usr/local/bin/supervisord
最后,在bash中,重新加载服务配置。 sudo systemctl daemon-reload
现在,所有服务都运行最新版本的主管。
也许,可以尝试解开服务。
systemctl unmask supervisor
systemctl enable supervisor
systemctl restart supervisor