Skip to content

proxy-1: error: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock #44

Open
@uvsmtid

Description

@uvsmtid

I started containers by:

sudo docker compose up -d

And proxy-1 containers kept printing this error:

sudo docker attach getting-started-todo-appgit-proxy-1
time="2025-01-11T02:22:10Z" level=error msg="Failed to retrieve information of the docker client and server host: 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/version\": dial unix /var/run/docker.sock: connect: permission denied" providerName=docker
time="2025-01-11T02:22:10Z" level=error msg="Provider connection error 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/version\": dial unix /var/run/docker.sock: connect: permission denied, retrying in 1.492128448s" providerName=docker
time="2025-01-11T02:22:11Z" level=error msg="Failed to retrieve information of the docker client and server host: 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/version\": dial unix /var/run/docker.sock: connect: permission denied" providerName=docker
time="2025-01-11T02:22:11Z" level=error msg="Provider connection error 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/version\": dial unix /var/run/docker.sock: connect: permission denied, retrying in 2.607840139s" providerName=docker
time="2025-01-11T02:22:14Z" level=error msg="Failed to retrieve information of the docker client and server host: 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/version\": dial unix /var/run/docker.sock: connect: permission denied" providerName=docker
time="2025-01-11T02:22:14Z" level=error msg="Provider connection error 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/version\": dial unix /var/run/docker.sock: connect: permission denied, retrying in 4.521606207s" providerName=docker

...

It does not matter how container is started - I subsequently:

  • First, avoided sudo.

  • Wiped out all to start clean: containers, images, volumes, etc.

  • Then, tried this (which rebuilt the containers again):

    docker compose watch
    

    This does not show you logs but the problem is there.

  • Then, re-tried with this (to see live logs with the problem above):

    docker compose up --watch
    

Versions:

uname -sr
Linux 6.12.8-200.fc41.x86_64
rpm -qa docker*
docker-cli-27.3.1-2.fc41.x86_64
docker-buildx-0.18.0-1.fc41.x86_64
docker-compose-2.30.3-1.fc41.x86_64
docker-compose-switch-1.0.5-1.fc41.x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions