Gitlab-ci-multi-runner | fatal: unable to access 'http://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@my_domain/username/projectname.git/': Failed to connect to my_domain port 80: Connection refused

The runner cannot clone the project repo to the docker container it is creating

I am running a Docker instance of gitlab-ce on my localhost.

Created a runner container using the gitlab-ci-multi-runner Docker image

Registered the runner with my gitlab shared host token (no issues)

Created a test project that contains a docker-compose file inside

I appended localhost my_domain to my /etc/hosts file

Created the following simple .gitlab-ci.yml file to specify the test:

image: jonaskello/docker-and-compose test: stage: test script: - docker-compose up -d

When I push to the project repo the test runs but I get the following error:

Using Docker executor with image jonaskello/docker-and-compose …
Using docker image sha256:afd16b12404fe6b3070ae7fc237d80afbe4d081a743207235e567f788013ecb8 for predefined container…
Pulling docker image jonaskello/docker-and-compose …
Using docker image jonaskello/docker-and-compose ID=sha256:8691b017f55330b4089af08a6050070a53ba8720bc991b4f36d33f533cad419a for build container…
Running on runner-a2a557d4-project-1-concurrent-0 via 4bcbe473b05f…
Cloning repository…
Cloning into ‘/builds/username/tester-ci’…
fatal: unable to access ‘http://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@my_domain/username/projectname.git/’: Failed to connect to my_domain port 80: Connection refused
ERROR: Job failed: exit code 1

config.toml for the runner in Docker is:

concurrent = 1 check_interval = 0 [[runners]] name = "default_docker-runner" url = "http://gitlab" token = "a2a557d4284ea6236381aa82d846e6" executor = "docker" [runners.docker] tls_verify = false image = "jonaskello/docker-and-compose" privileged = false disable_cache = false volumes = ["/var/run/docker.sock:/var/run/docker.sock", "/cache"] shm_size = 0 [runners.cache]

Any and all help with this would be greatly appreciated

1 Like

I am having this same issue. How do i solve it. I have added login, copied DOCKER_AUTH_CONFIG secret variable, copied ssh keys everywhere etc… This is one of the most frustrating pieces of software I have ever used. Goodness.Maybe time to go back to jenkins.

Hey, did you figure it out?

I had this problem too on one of my machines. I registered a runner on a different machine and it worked. :man_shrugging: