我已经在Ubuntu系统上安装了GitHub self-hosted runner
。当我试图将其配置为服务时,出现以下错误。
$ sudo ./svc.sh start
Failed to start actions.runner._services.Linux-Host01.service: Unit actions.runner._services.Linux-Host01.service is not loaded properly: Exec format error.
See system logs and 'systemctl status actions.runner._services.Linux-Host01.service' for details.
Failed: failed to start actions.runner._services.Linux-Host01.service
$ systemctl status actions.runner._services.Linux-Host01.service
● actions.runner._services.Linux-Host01.service - GitHub Actions Runner (_services.Linux-Host01)
Loaded: error (Reason: Exec format error)
Active: inactive (dead)
$ cat /etc/systemd/system/actions.runner._services.Linux-Host01.service
[Unit]
Description=GitHub Actions Runner (_services.Linux-Host01)
After=network.target
[Service]
ExecStart=/home/admin.user/actions-runner/runsvc.sh
User=admin.user
WorkingDirectory=/home/admin.user/actions-runner
KillMode=process
KillSignal=SIGTERM
TimeoutStopSec=5min
[Install]
WantedBy=multi-user.target
$ sudo journalctl -u actions.runner._services.Linux-Host01.service -f
Aug 04 08:40:47 Linux-Host01 systemd[1]: /etc/systemd/system/actions.runner._services.Linux-Host01.service:7: Invalid user/group name or numeric ID: admin.user
此外,已向actions.runner._services.Linux-Host01.service
提供可执行权限,但仍会导致相同的错误。
这是怎么回事?
3条答案
按热度按时间rvpgvaaj1#
我已将
/etc/systemd/system/actions.runner._services.Linux-Host01.service
文件中的User=admin.user
更改为User=uid
,然后执行现在操作服务已启动,并且运行良好。
hmae6n7t2#
早上好,
首先停止服务:
然后确保您已向用户授予权限:
现在尝试启动服务:
并告诉我,如果这工作时,检查状态。
如果不起作用,请执行相同的操作,但sudo权限:
然后在没有sudo命令的情况下重试,因为您实际上是在root用户上。
祝你今天愉快!
jmo0nnb33#
这仅仅意味着您尚未安装runner
sudo ./svc.sh install
//安装转轮sudo ./svc.sh start
//然后启动它请记住,这是比使用
./run.sh
脚本更好的方法,因为runner将始终在后台运行。使用
sudo ./svc.sh status
确认转轮已启动并运行。