【问题标题】:Gitlab runner doesn't startGitlab runner 没有启动
【发布时间】:2022-01-01 16:46:13
【问题描述】:

在我的实例中,

我在 Apple Silicon M1 上添加了一个跑步者,但这个跑步者没有启动。 这就是为什么我给它分配了一个项目,希望能开始,但我看到了这个

  • 但是我如何检查为什么会有红色! ?
  • 是什么阻止了它的启动?

这就是我所做的。

创建 docker runner:

docker stop gitlab-runner && docker rm gitlab-runner

docker run -d --name gitlab-runner --restart always \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /Users/Shared/gitlab-runner/config:/etc/gitlab-runner \
  gitlab/gitlab-runner:latest

注册跑步者:

docker run --rm -v /Users/Shared/gitlab-runner/config:/etc/gitlab-runner gitlab/gitlab-runner register \
  --non-interactive \
  --executor "docker" \
  --docker-image hannesa2/android-ndk:api28_emu \
  --url "http://latitude:8083/" \
  --registration-token "<TOKEN>" \
  --description "M1 pro Android NDK + Emu" \
  --tag-list "android,android-ndk,android-emu" \
  --run-untagged="true" \
  --locked="false" \
  --access-level="not_protected"

我在 docker 日志中看到了这一点

Runtime platform         arch=arm64 os=linux pid=8 revision=4b9e985a version=14.4.0
Starting multi-runner from /etc/gitlab-runner/config.toml...  builds=0
Running in system-mode.                            

Configuration loaded     builds=0
listen_address not defined, metrics & debug endpoints disabled  builds=0
[session_server].listen_address not defined, session endpoints disabled  builds=0
ERROR: Failed to load config stat /etc/gitlab-runner/config.toml: no such file or directory  builds=0
ERROR: Failed to load config stat /etc/gitlab-runner/config.toml: no such file or directory  builds=0
ERROR: Failed to load config stat /etc/gitlab-runner/config.toml: no such file or directory  builds=0
ERROR: Failed to load config stat /etc/gitlab-runner/config.toml: no such file or directory  builds=0
ERROR: Failed to load config stat /etc/gitlab-runner/config.toml: no such file or directory  builds=0
Configuration loaded     builds=0

Host自带这个文件/Users/Shared/gitlab-runner/config/config.toml

Docker 容器也自带

谢谢

【问题讨论】:

  • 运行器是它自己的二进制文件,有自己的日志文件。跑步者报告的日志是什么?你看到了什么错误?如果您能提供更多信息,我们可以提供更多帮助。
  • @Patrick 我更新了客户端的日志信息(我发现的)

标签: gitlab gitlab-ci gitlab-ci-runner


【解决方案1】:

您以-v /srv/gitlab-runner/config:/etc/gitlab-runner 开始跑步者。但注册使用不同的卷路径 (-v /Users/Shared/gitlab-runner/config:/etc/gitlab-runner)。

所以实际运行者找不到注册命令正在写入的配置。您应该对两个调用使用相同的 hostPath。

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2019-04-12
  • 2023-01-24
  • 2022-07-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多