GitLab Runner 重启后不会自动拾取作业

2024-06-21

所以我们的 GitLab Runner 已经正常运行了几周了。我必须进行一些升级,需要在安装它的计算机上重新启动。

重新启动后,它不再自动拾取作业。我所有的管道都说它们被卡住了,因为没有跑步者可以接替工作。

我通过 SSH 连接到机器并运行

sudo gitlab-runner run

and the jobs get picked up as I expect them to be. However when I press CTRL + C it stops any picked up jobs and stops picking up any other jobs again. How do I fix this so that it's back to how it was before the reboot?

附加信息

当我跑的时候

sudo gitlab-runner start

我收到一条错误消息:FATAL: Failed to start gitlab-runner: "systemctl" failed: exit status 5, Failed to start gitlab-runner.service: Unit gitlab-runner.service not found.

我运行的时候也出现了类似的错误

sudo gitlab-runner restart

因此,从上面的错误消息来看,它表明该服务尚未安装(不知道为什么)。跑步

gitlab-runner status

确实说gitlab-runner: Service is not installed.

So I did

gitlab-runner install -u gitlab-runner

我不确定是否gitlab-runner是在此问题出现之前使用的默认用户,但我至少现在在这里使用它。

安装完我刚刚发布的服务后

gitlab-runner start

而且这些工作又会自动恢复。


我对为什么会发生这种情况的唯一猜测是因为我跑了apt-get upgrade它尝试使用可用的更新来升级所有组件,这当然更新了我们的 GitLab Runner 版本。以某种方式卸载该服务?我不知道。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

GitLab Runner 重启后不会自动拾取作业 的相关文章

随机推荐