ezstream 服务意外退出

ezstream 服务意外退出

我让 Icecast 在启动时启动并在后台运行,因此:

# systemctl status icecast2
● icecast2.service - LSB: Icecast2 streaming media server
   Loaded: loaded (/etc/init.d/icecast2; generated)
   Active: active (running) since Sun 2022-02-27 05:26:53 CET; 3 weeks 5 days ago
     Docs: man:systemd-sysv-generator(8)
  Process: 623 ExecStart=/etc/init.d/icecast2 start (code=exited, status=0/SUCCESS)
  Process: 31649 ExecReload=/etc/init.d/icecast2 reload (code=exited, status=0/SUCCESS)
    Tasks: 6 (limit: 4915)
   Memory: 10.9M
   CGroup: /system.slice/icecast2.service
           └─684 /usr/bin/icecast2 -b -c /etc/icecast2/icecast.xml

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

我也有 ezstream,它在启动时启动,但几天后一直退出,因此:

# systemctl status ezstream
● ezstream.service - source client for Icecast with external de-/encoder support
   Loaded: loaded (/lib/systemd/system/ezstream.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Fri 2022-03-18 13:24:01 CET; 1 weeks 0 days ago
  Process: 21047 ExecStart=/usr/local/bin/ezstream -c ezstream_mp3.xml (code=exited, status=0/SUCCESS)
 Main PID: 21047 (code=exited, status=0/SUCCESS)

该文件/lib/systemd/system/ezstream.service包含:

[Unit]
Description=source client for Icecast with external de-/encoder support
Requires=icecast2.service
After=icecast2.service

[Service]
User=archiwum
WorkingDirectory=/home/archiwum/autopilot
ExecStart=/usr/local/bin/ezstream -c ezstream_mp3.xml
Restart=on-failure
RestartSec=5

[Install]
WantedBy=icecast2.service

ezstream_mp3.xml有设置播放列表自动重复的元素:<stream_once>0</stream_once>。系统是Debian 10(4.19.0-16-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 GNU/Linux)。

那么,ezstream 为何会退出?又该如何防止这种情况发生?(目前,我可能会systemctl status ezstream每分钟发出一次该命令作为解决方法。)

相关内容