我有一个运行 Raspberry Pi 操作系统的 Raspberry Pi 5 8gb,我遇到的问题是qbittorrent-nox
,我使用 apt 安装的设备在大约 1 分 30 秒后不断崩溃。
由于我有一个qbittorrent-nox
自动启动的服务,它会在 3 秒内重新启动,但重新启动很烦人,而且显然不利于播种和水蛭,我想知道为什么会发生这种情况。
进行了一些实验,日志中有些内容表明该systemd
服务正在超时,并且可以肯定的是,我运行的用户 qbitqbittorrent-nox
似乎运行良好,无需重新启动。
日志和systemd
服务文件之前已经包含在内,我使用了样板代码,没有做太多调整,也不太理解其中的很多内容。
Service:
[Unit]
Description=qBittorrent Command Line Client
After=network.target
[Service]
#Do not change to "simple"
Type=forking
User=qbit
Group=qbit
ExecStart=/usr/bin/qbittorrent-nox
ExecStop=/usr/bin/killall -w qbittorrent-nox
Restart=on-failure
[Install]
WantedBy=multi-user.target
服务日志:
MAGPi@raspberrypi:~ $ journalctl -xeu qbit.service
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit qbit.service has finished with a failure.
░░
░░ The job identifier is 152795 and the job result is failed.
Dec 18 00:05:26 raspberrypi systemd[1]: qbit.service: Consumed 1.685s CPU time.
░░ Subject: Resources consumed by unit runtime
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit qbit.service has finished with a failure.
░░
░░ Defined-By: systemd
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit qbit.service has finished with a failure.
░░
░░ The job identifier is 152795 and the job result is failed.
Dec 18 00:05:26 raspberrypi systemd[1]: qbit.service: Consumed 1.685s CPU time.
░░ Subject: Resources consumed by unit runtime
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ The unit qbit.service completed and consumed the indicated resources.
Dec 18 00:05:26 raspberrypi systemd[1]: qbit.service: Scheduled restart job, restart counter is at 1784.
░░ Subject: Automatic restarting of a unit has been scheduled
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ Automatic restarting of the unit qbit.service has been scheduled, as the result for
░░ the configured Restart= setting for the unit.
Dec 18 00:05:26 raspberrypi systemd[1]: Stopped qbit.service - qBittorrent Command Line Client.
░░ Subject: A stop job for unit qbit.service has finished
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A stop job for unit qbit.service has finished.
░░
░░ The job identifier is 152877 and the job result is done.
Dec 18 00:05:26 raspberrypi systemd[1]: qbit.service: Consumed 1.685s CPU time.
░░ Subject: Resources consumed by unit runtime
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ The unit qbit.service completed and consumed the indicated resources.
Dec 18 00:05:26 raspberrypi systemd[1]: Starting qbit.service - qBittorrent Command Line Client...
░░ Subject: A start job for unit qbit.service has begun execution
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit qbit.service has begun execution.
░░
░░ The job identifier is 152877.
```