Paulo Matos
Paulo Matos

Reputation: 1664

CI Gitlab fails with docker daemon system failure

I have a gitlab CI pipeline setup and sometimes I get random failures where the test is on-going but then it shows:

ERROR: Job failed (system failure): Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

What could be the reason for this?

This is on Gitlab 11.1.4, gitlab-runner 10.7.4, Docker version 1.13.1.

Upvotes: 0

Views: 689

Answers (2)

Paulo Matos
Paulo Matos

Reputation: 1664

The problem seemed to be a too old docker daemon. Recent docker versions >= 18.06.0-ce seem to behave well.

Upvotes: 0

lambda
lambda

Reputation: 56

Ok.

So a docker container cannot be created.

It could be those Reasons:

- the user gitlab-runner (the one who take the pipelines and starts them) is not member of the docker group

    - sudo usermod -a -G docker gitlab-runner

- The Daemon is not running. Enable it (so that it start at boot)

     systemctl enable docker && systemctl start docker

Upvotes: 1

Related Questions