Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock

Hello World!

I'm trying to Run Filebeat on Docker | Filebeat Reference [7.17] | Elastic yet running into following issue:

% docker-compose logs --tail 2 filebeat
filebeat  | 2022-06-20T19:05:12.965Z    ERROR   instance/beat.go:1014   Exiting: error in autodiscover provider settings: error setting up docker autodiscover provider: 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.24/info": dial unix /var/run/docker.sock: connect: permission denied
filebeat  | Exiting: error in autodiscover provider settings: error setting up docker autodiscover provider: 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.24/info": dial unix /var/run/docker.sock: connect: permission denied
%

I use these:


Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/info"

perhaps somewhere here, instead of using /var/run/docker.sock, filebeat adds somewhere http:// in front of it, and that's causing an issue and I can't find where is it..

Please advise.
Thank you in advance!

I also get same behavior with metricbeat as well

# docker compose logs --tail 1
metricbeat  | 2022-07-13T17:27:55.428Z	ERROR	[docker]	event/event.go:109	Error watching for docker events: 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.24/events?since=1657729811": dial unix /var/run/docker.sock: connect: permission denied
#

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.