Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got permission denied while trying to connect to the Docker daemon socket #79

Open
muskiii opened this issue Jan 23, 2022 · 1 comment

Comments

@muskiii
Copy link

muskiii commented Jan 23, 2022

while running the Sanbox up facing an issue with telegraf saying:

23T16:59:05Z E! [inputs.docker] Error in plugin: 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.21/info": dial unix /var/run/docker.sock: connect: permission denied

2022-01-23T16:59:05Z E! [inputs.docker] Error in plugin: 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.21/containers/json?filters=%7B%22status%22%3A%5B%22running%22%5D%7D&limit=0": dial unix /var/run/docker.sock: connect: permission denied

i think it has something to do with https://www.influxdata.com/blog/docker-run-telegraf-as-non-root/

@AirDRoN-lab
Copy link

AirDRoN-lab commented Oct 11, 2022

while running the Sanbox up facing an issue with telegraf saying:

Hello, try add this to docker-compose.yml:

telegraf:
      user: telegraf:<your_host_docker_gid>

For my case your_host_docker_gid = 998. You can check it execute stat -c '%g' /var/run/docker.sock in telegraf container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants