question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Initializing containers fails on self-hosted runners

See original GitHub issue

Describe the bug Our self hosted actions runner stopped working correctly during the step “Initialize Containers” and threw out an error message Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.40/version: dial unix /var/run/docker.sock: connect: permission denied. It was first observed in https://github.com/DimensionDev/Maskbook/runs/669343239?check_suite_focus=true.

We migrated our almost all CI jobs to actions on our self hosted runner in this PR and it worked just fine.

To Reproduce I don’t know if this can be reproduced on other machines but I can provide the specs of our machine:

Ubuntu 18.04 on AWS
4 Core 8GB Mem

Expected behavior It initializes the container correctly.

Runner Version and Platform

Neither 2.165.2 nor 2.262.1 works
Ubuntu 18.04

What’s not working?

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:7
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
fidanfcommented, Dec 23, 2021

We’ve been encountering this problem earlier this week. Migrating to Ubuntu focal seems to have fix it. Then we had to adjust docker privileges and restart the runner process (see this link)

1reaction
TingluoHuangcommented, May 19, 2020

@yisiliu make sure your runner’s run-as account has permission to execute docker command without sudo https://docs.docker.com/engine/install/linux-postinstall/

Read more comments on GitHub >

github_iconTop Results From Across the Web

Self-hosted runner: step set up fails when trying to use ...
I'm running a self-hosted runner and whenever I try to enable docker support for individual steps, or for all steps via `options: docker:...
Read more >
Initialize container, failing when executing useradd in ...
When running my azure pipeline I run into the below error when trying to initialize a container. OCI runtime exec failed: exec failed: ......
Read more >
Pipeline job with docker:dind failed on self hosted runner ...
I try to configure self hosted Gitlab and Gitlab runner, both run on docker based on this and this on Ubuntu server 20.04...
Read more >
Troubleshoot self-hosted runner
Container fails to start due to disk space · Pod host node runs out of memory · Pod host node is out of...
Read more >
Tutorial: Run GitHub Actions runners and Azure Pipelines ...
Any steps in your workflows that use Docker commands will fail when run on a self-hosted runner or agent in a Container Apps...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found