[英]Gitlab-runner build error
I am trying to set up gitlab-runner
for CI / CD. 我正在尝试为CI / CD设置
gitlab-runner
。 When trying to run my build, it errors uniformly with the following: 尝试运行我的构建时,出现以下错误:
Running with gitlab-ci-multi-runner 9.1.0 (0118d89) on web1 (27e4fda8)
Using Docker executor with image meteorhacks/meteord:onbuild ...
Using docker image sha256:29874b1497a5371d90e42eb5401c7471ce94a4bce218dcefb2249bbbcb6830ae for predefined container...
Pulling docker image meteorhacks/meteord:onbuild ...
Using docker image meteorhacks/meteord:onbuild ID=sha256:3776323ff75691de7182e5871bd9584671ee9ca066e26638327b44cc46f9a0c0 for build container...
Running on runner-27e4fda8-project-3-concurrent-0 via web1...
Cloning repository...
Cloning into '/builds/foo/bar'...
fatal: unable to access 'http://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@gitlab.foo.bar.net/foo/bar.git/':
Failed to connect to gitlab.foo.bar.net port 80: Operation timed out ERROR: Job failed: exit code 1
The odd part is that, from the runner box, I can run: 奇怪的是,我可以从流道框运行:
wget http://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@gitlab.foo.bar.net/foo/bar.git/
This works with absolutely no timeout. 这绝对没有超时。 So I don't know how to debug a network timeout if I can't reproduce it myself!
因此,如果我自己无法重现网络超时,我将不知道如何调试它!
My setup had both gitlab and the gitlab-runner in docker containers. 我的设置在Docker容器中同时包含gitlab和gitlab-runner。 My gitlab had a static local ip and was in a custom docker network with the gitlab-runner.
我的gitlab具有静态本地ip,并且位于带有gitlab-runner的自定义docker网络中。
I was having a similar problem, until I realized my gitlab runners were spawned in the default bridge network and thus didn't see my gitlab's address. 我遇到了类似的问题,直到我意识到我的gitlab运行程序是在默认的桥接网络中生成的,因此看不到我的gitlab的地址。
I fixed the problem simply by adding: 我通过添加以下内容解决了该问题:
network_mode = "network_name" (ie. gitlab_default)
to my runners config.toml. 给我的跑步者config.toml。
Hope this helps! 希望这可以帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.