Reputation: 20730
I am trying to set up gitlab-runner
for CI / CD. 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:[email protected]/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:[email protected]/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!
Upvotes: 0
Views: 710
Reputation: 11
My setup had both gitlab and the gitlab-runner in docker containers. My gitlab had a static local ip and was in a custom docker network with the gitlab-runner.
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.
I fixed the problem simply by adding:
network_mode = "network_name" (ie. gitlab_default)
to my runners config.toml.
Hope this helps!
Upvotes: 1