页次: 1
开关机界面都会显示 failed to start aria2.service
然后 journalctl -xeu aria2cd.service 结果如下:
░░ The job identifier is 2298.
Nov 02 12:26:37 xylzq aria2c[2826]: Specify at least one URL.
Nov 02 12:26:37 xylzq aria2c[2826]: Usage: aria2c [OPTIONS] [URI | MAGNET | TORRENT_FILE | METALINK_FILE]...
Nov 02 12:26:37 xylzq aria2c[2826]: See 'aria2c -h'.
Nov 02 12:26:37 xylzq systemd[1]: aria2cd.service: Control process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ An ExecStart= process belonging to unit aria2cd.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Nov 02 12:26:37 xylzq systemd[1]: aria2cd.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ The unit aria2cd.service has entered the 'failed' state with result 'exit-code'.
Nov 02 12:26:37 xylzq systemd[1]: Failed to start aria2c Service.
░░ Subject: A start job for unit aria2cd.service has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A start job for unit aria2cd.service has finished with a failure.
░░
░░ The job identifier is 2298 and the job result is failed.
systemctl status aria2cd.service结果如下:
aria2cd.service - aria2c Service
Loaded: loaded (/etc/systemd/system/aria2cd.service; enabled; preset: disabled)
Active: activating (auto-restart) (Result: exit-code) since Wed 2022-11-02 12:33:40 CST; 25s ago
Process: 3758 ExecStart=/usr/bin/aria2c -D --conf-path=${ARIA2C_CONF} --save-session-interval=180 --savepath=${ARIA2C_CONF} --save-session-interval=180 --save-session=${ARIA2C_SESSION} (code=exited, status=1/FAIL-session=${ARIA2C_SESSION} (code=exited, status=1/FAILURE)
CPU: 24ms
请问,这是出啥问题了呀...
最近编辑记录 公子希夷 (2022-11-02 12:37:22)
离线
Nov 02 12:26:37 xylzq aria2c[2826]: Specify at least one URL.
需要你指定至少一个URL,你的aria2c配置文件是不是忘了指定“daemon=true”
或者加-D --daemon 以守护进程模式运行
最近编辑记录 Watermelon.Rei (2022-11-02 13:32:28)
离线
systemctl cat aria2cd.service 看看。
另外贴日志的时候不要加 -x 选项。
离线
Nov 02 12:26:37 xylzq aria2c[2826]: Specify at least one URL.
需要你指定至少一个URL,你的aria2c配置文件是不是忘了指定“daemon=true”
或者加-D --daemon 以守护进程模式运行
配置文件第一行就是,“daemon=true”,然后我重启之前都是正常的,重启后就无法连接了,所以配置文件可能没问题
加-D --daemon 以守护进程模式运行.... 这个,怎么操作呀
离线
systemctl cat aria2cd.service 看看。
另外贴日志的时候不要加 -x 选项。
[Unit]
Description=aria2c Service
Requires=network.target
After=dhcpcd.service
[Service]
Type=forking
User=aria2c
Group=aria2c
WorkingDirectory=/var/share/aria2c
EnvironmentFile=/etc/conf.d/aria2c-env.conf
ExecStart=/usr/bin/aria2c -D --conf-path=${ARIA2C_CONF} --save-session-interval=180 --save-session=${ARIA2C_SESSION}
ExecReload=/usr/bin/kill -HUP $MAINPID
RestartSec=1min
Restart=on-failure
[Install]
WantedBy=multi-user.target
运行结果是这样子的
然后,journalctl -eu aria2cd.service,结果如下:
Nov 02 17:06:45 xylzq systemd[1]: Failed to start aria2c Service.
Nov 02 17:07:46 xylzq systemd[1]: aria2cd.service: Scheduled restart job, restart counter is at 11.
Nov 02 17:07:46 xylzq systemd[1]: Stopped aria2c Service.
Nov 02 17:07:46 xylzq systemd[1]: Starting aria2c Service...
Nov 02 17:07:46 xylzq aria2c[3960]: Specify at least one URL.
Nov 02 17:07:46 xylzq aria2c[3960]: Usage: aria2c [OPTIONS] [URI | MAGNET | TORRENT_FILE | METALINK_FILE]...
Nov 02 17:07:46 xylzq aria2c[3960]: See 'aria2c -h'.
Nov 02 17:07:46 xylzq systemd[1]: aria2cd.service: Control process exited, code=exited, status=1/FAILURE
Nov 02 17:07:46 xylzq systemd[1]: aria2cd.service: Failed with result 'exit-code'.
Nov 02 17:07:46 xylzq systemd[1]: Failed to start aria2c Service.
Nov 02 17:08:46 xylzq systemd[1]: aria2cd.service: Scheduled restart job, restart counter is at 12.
Nov 02 17:08:46 xylzq systemd[1]: Stopped aria2c Service.
Nov 02 17:08:46 xylzq systemd[1]: Starting aria2c Service...
Nov 02 17:08:46 xylzq aria2c[4045]: Specify at least one URL.
Nov 02 17:08:46 xylzq aria2c[4045]: Usage: aria2c [OPTIONS] [URI | MAGNET | TORRENT_FILE | METALINK_FILE]...
Nov 02 17:08:46 xylzq aria2c[4045]: See 'aria2c -h'.
Nov 02 17:08:46 xylzq systemd[1]: aria2cd.service: Control process exited, code=exited, status=1/FAILURE
Nov 02 17:08:46 xylzq systemd[1]: aria2cd.service: Failed with result 'exit-code'.
Nov 02 17:08:46 xylzq systemd[1]: Failed to start aria2c Service.
Nov 02 17:09:46 xylzq systemd[1]: aria2cd.service: Scheduled restart job, restart counter is at 13.
Nov 02 17:09:46 xylzq systemd[1]: Stopped aria2c Service.
Nov 02 17:09:46 xylzq systemd[1]: Starting aria2c Service...
Nov 02 17:09:46 xylzq aria2c[4099]: Specify at least one URL.
Nov 02 17:09:46 xylzq aria2c[4099]: Usage: aria2c [OPTIONS] [URI | MAGNET | TORRENT_FILE | METALINK_FILE]...
Nov 02 17:09:46 xylzq aria2c[4099]: See 'aria2c -h'.
Nov 02 17:09:46 xylzq systemd[1]: aria2cd.service: Control process exited, code=exited, status=1/FAILURE
Nov 02 17:09:46 xylzq systemd[1]: aria2cd.service: Failed with result 'exit-code'.
Nov 02 17:09:46 xylzq systemd[1]: Failed to start aria2c Service.
最近编辑记录 公子希夷 (2022-11-02 17:11:46)
离线
那你手动执行服务里指定的命令呢?(可以用 extrace 工具查看命令被执行时具体给的参数)
离线
那你手动执行服务里指定的命令呢?(可以用 extrace 工具查看命令被执行时具体给的参数)
输入: sudo systemctl restart aria2cd
输出:Job for aria2cd.service failed because the control process exited with error code.
See "systemctl status aria2cd.service" and "journalctl -xeu aria2cd.service" for details.
上面显示让我查看日志,然后日志就是上边发的....
离线
我是让你执行 ExecStart 后边那个。
离线
Watermelon.Rei 说:Nov 02 12:26:37 xylzq aria2c[2826]: Specify at least one URL.
需要你指定至少一个URL,你的aria2c配置文件是不是忘了指定“daemon=true”
或者加-D --daemon 以守护进程模式运行配置文件第一行就是,“daemon=true”,然后我重启之前都是正常的,重启后就无法连接了,所以配置文件可能没问题
加-D --daemon 以守护进程模式运行.... 这个,怎么操作呀
这两个操作效果是一样的,你的服务里写了
ExecStart=/usr/bin/aria2c -D --conf-path=${ARIA2C_CONF} --save-session-interval=180 --save-session=${ARIA2C_SESSION}
写在运行参数里了,看起来不是守护进程的问题
离线
我.....最终还是不知道该怎么处理,就直接把软件卸载了然后把所以有关的配置文件全删了,再重新安装了一遍,就又可以了,希望不会再出现这种问题....
离线
页次: 1