-
Notifications
You must be signed in to change notification settings - Fork 251
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
inputs.docker plugin unix:///var/run/docker.sock Permission Denied #543
Comments
I have the same problem since watchtower upgrade my version to 1.20.3 |
I have found a workaround. If you also use Portainer, change the container from user "Telegraf" to "root". |
Hi, We recently made a change to our Telegraf container images to run the telegraf process as the The docker user directive can accomplish this by adding:
We have a full post on why we made this change and the impact to users. Thanks! |
Hi |
Hi, The Docker Compose setting uses the
Where GID is the GID of the socket itself on the host machine. |
Thank you 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 |
Can you run the following two commands on your host system (not in docker):
|
Thank you for your help srw-rw---- 1 root docker 0 nov. 4 13:36 /var/run/docker.sock Command 2: Thanks |
Based on that output the socket is owned by the |
Hey it works ! |
So any suggestion to use in swarm mode? as each node got different docker groups? |
This doesn't really work in Kubernetes, either. |
Hi @powersj Im hitting same issue but it still persists
and my error
|
I'd like to bump this too... I'm seeing the exact same as rsuplina, above. I'm using docker desktop on mac, and see the following:
I have added
|
Another bump from me. Both |
Relevent telegraf.conf
System info
Telegraf 1.20.3, RaspberryPiOS (Debian Buster) on Raspberry Pi 4, Docker-CE 20.10.10
Docker
docker-compose.yml
Steps to reproduce
Enable plugin in telegraf.conf
Start telegraf container
Observe errors in the log
No Docker timeseries data stored in InfluxDB
Expected behavior
Docker Engine API data collected through unix:///var/run/docker.sock and stored as timeseries to InfluxDB
Worked correctly in previous telegraf 1.20.x versions
Actual behavior
telegraf log error:
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
Additional info
I assume that the bug is triggered by commit #536.
4ca4baf
The text was updated successfully, but these errors were encountered: