我想在重启Ubuntu 16.04时使用Supervisor。
这是/etc/systemd/system/supervisord.service
[Unit]
Description=Supervisor daemon
Documentation=http://supervisord.org
After=network.target
[Service]
ExecStart=/usr/bin/supervisord -c /etc/supervisord.conf
ExecStop=/usr/bin/supervisorctl $OPTIONS shutdown
ExecReload=/usr/bin/supervisorctl $OPTIONS reload
KillMode=process
Restart=on-failure
RestartSec=42s
[Install]
WantedBy=multi-user.target
但是当我重启ubuntu系统时,它不起作用。
我尝试命令:
sudo journalctl -u supervisord.service
据此:
-- Reboot --
Aug 22 02:16:56 iZ2893napp8Z systemd[1]: Started Supervisor daemon.
Aug 22 02:16:57 iZ2893napp8Z supervisord[781]: Error: Another program is already listening on a port that one of our HTTP servers is configured to use. Shut this program down first before starting supervisord.
Aug 22 02:16:57 iZ2893napp8Z supervisord[781]: For help, use /usr/bin/supervisord -h
Aug 22 02:16:57 iZ2893napp8Z systemd[1]: supervisord.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Aug 22 02:16:57 iZ2893napp8Z supervisorctl[874]: ERROR: unix:///var/run/supervisor.sock no such file (already shut down?)
Aug 22 02:16:57 iZ2893napp8Z systemd[1]: supervisord.service: Unit entered failed state.
Aug 22 02:16:57 iZ2893napp8Z systemd[1]: supervisord.service: Failed with result 'exit-code'.
Aug 22 02:17:41 iZ2893napp8Z systemd[1]: supervisord.service: Service hold-off time over, scheduling restart.
Aug 22 02:17:41 iZ2893napp8Z systemd[1]: Stopped Supervisor daemon.
Aug 22 02:17:41 iZ2893napp8Z systemd[1]: Started Supervisor daemon.
Aug 22 02:17:42 iZ2893napp8Z supervisorctl[906]: Shut down
lines 4-83/83 (END)
尝试命令:
/usr/bin/supervisord -n -c /etc/supervisord.conf
据此:
2018-08-22 02:36:18,352 CRIT Supervisor running as root (no user in config file)
2018-08-22 02:36:18,352 WARN Included extra file "/etc/supervisor/frp.conf" during parsing
2018-08-22 02:36:18,361 INFO RPC interface 'supervisor' initialized
2018-08-22 02:36:18,362 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2018-08-22 02:36:18,362 INFO supervisord started with pid 1278
2018-08-22 02:36:19,364 INFO spawned: 'frp_0' with pid 1281
2018-08-22 02:36:20,366 INFO success: frp_0 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-08-22 02:36:21,283 INFO waiting for frp_0 to die
2018-08-22 02:36:21,285 INFO stopped: frp_0 (terminated by SIGTERM)
谁能告诉我原因?非常感谢!