Hello,
I am using gitlab-runner version 14.4.0 and docker version 20.10.11 on Ubuntu 18.04.6 LTS The machine I am using for the runners is a powerful Supermicro server. Our Gitlab CI is on gitlab cloud (SAAS)
I have been receiving the following errors on Build stage jobs:
- ERROR: Job failed (system failure): Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? (exec.go:66:120s)
- Error: Job failed (system failure): Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? (docker.go:708:120s)
- Preparation failed: adding cache volume: set volume permissions: create permission container for volume “runner-######-project-#####-concurrent-0-cache-##############”: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? (linux_set.go:90:120s)
- ERROR: Job failed (system failure): prepare environment: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? (docker.go:708:120s). Check Types of shells supported by GitLab Runner | GitLab for more information
The solutions I have tried so far:
- Added multi pull policy: pull_policy = [“always”, “if-not-present”] in config.toml for all runners
- Gave permission to gitlab-runner user for docker and sudo groups
- Tried chmod 666 /var/run/docker.sock
- systemctl docker enable & systemctl docker start
- restarted gitlab-runner and reloaded daemon
- Fresh installed the machine from scratch with Ubuntu 18.04.6 LTS, latest docker and gitlab-runner
Nothing seemed to have solved the issue. Usually just restarting the jobs after the error gets the jobs running. But that is not a solution.
I am new to this and any help is appreciated!
Thank you