Reputation: 11
I encountered following issue: I have 2 docker containers: one for my gitlab instance and one for my runner. Both are on the same host and even in the same docker network. However pulling and executing scripts are working fine, but as soon as i try to use artifacts i run into a connection error. The strange thing about it is that the ip address is nowhere related to my server its a recursive dns service from my hosting provider hetzner. My runner compose.yml
services:
gitlab-runner:
image: gitlab/gitlab-runner:latest
container_name: runner
restart: always
volumes:
- /srv/gitlab-runner/config:/etc/gitlab-runner
- /var/run/docker.sock:/var/run/docker.sock
networks:
- proxy-network
networks:
proxy-network:
name: proxy-network
external: true
my config.toml:
concurrent = 10
check_interval = 0
connection_max_age = "15m0s"
shutdown_timeout = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "runner"
url = "http://gitlab"
id = 1
token = "secret"
token_obtained_at = 2024-09-24T22:41:15Z
token_expires_at = 0001-01-01T00:00:00Z
executor = "docker"
[runners.custom_build_dir]
[runners.cache]
MaxUploadedArchiveSize = 0
[runners.cache.s3]
[runners.cache.gcs]
[runners.cache.azure]
[runners.docker]
tls_verify = false
image = "ubuntu:latest"
privileged = false
disable_entrypoint_overwrite = false
oom_kill_disable = false
disable_cache = false
volumes = ["/cache"]
shm_size = 0
network_mtu = 0
network_mode = "host"
my gitlab compose.yml:
version: '3'
services:
gitlab:
image: gitlab/gitlab-ce:latest
container_name: gitlab
restart: always
hostname: 'gitlab'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'myurl'
nginx['listen_port'] = 80
nginx['listen_https'] = false
nginx['proxy_set_headers'] = {
"X-Forwarded-Proto" => "https",
"X-Forwarded-Ssl" => "on"
}
gitlab_rails['gitlab_shell_ssh_port'] = 2222
ports:
- '8080:80'
- '8443:443'
- '22:22'
volumes:
- '$GITLAB_HOME/config:/etc/gitlab'
- '$GITLAB_HOME/logs:/var/log/gitlab'
- '$GITLAB_HOME/data:/var/opt/gitlab'
shm_size: '256m'
networks:
- proxy-network
networks:
proxy-network:
name: proxy-network
external: true
i tried so much but i cant overcome this error:
$ echo "Building ..."
Building ...
$ mkdir -p build
$ touch build/somefile.txt
Uploading artifacts for successful job
00:03
Uploading artifacts...
ERROR: Uploading artifacts as "archive" to coordinator... error error=couldn't execute POST against http://gitlab:80/api/v4/jobs/27/artifacts?artifact_format=zip&artifact_type=archive: Post "http://gitlab:80/api/v4/jobs/27/artifacts?artifact_format=zip&artifact_type=archive": dial tcp: lookup gitlab on 185.12.64.2:53: no such host id=27 token=glcbt-64
FATAL: invalid argument
ERROR: Job failed: exit code 1
the actual runner gives me this information:
Running on runner-tj6qbzsfw-project-2-concurrent-0 via 77f500501b11...
Fetching changes with git depth set to 20...
Reinitialized existing Git repository in /builds/developer/test/.git/
fatal: unable to access 'someurl': Failed to connect to myurl port 443 after 130582 ms: Could not connect to server
Im using the nginx proxy manager btw to redirect for my several services maybe i made a mistake there.
Upvotes: 1
Views: 68