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

Ubuntu 22.04.2 LTS always Starting the Docker Engine Cannot connect to the Docker daemon at unix:///var/run/docker.sock #4367

Closed
xibaoning opened this issue Jun 25, 2023 · 3 comments

Comments

@xibaoning
Copy link

Description

install docker-desktop-4.20.1-amd64.deb

docker version
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Client: Docker Engine - Community
Cloud integration: v1.0.33
Version: 24.0.2
API version: 1.43
Go version: go1.20.4
Git commit: cb74dfc
Built: Thu May 25 21:51:00 2023
OS/Arch: linux/amd64
Context: default

docker --version
Docker version 24.0.2, build cb74dfc

docker dfesktop ui
Starting the Docker Engine...
Docker Engine is the underlying technology that runs containers

Reproduce

install
run

Expected behavior

No response

docker version

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Client: Docker Engine - Community
 Cloud integration: v1.0.33
 Version:           24.0.2
 API version:       1.43
 Go version:        go1.20.4
 Git commit:        cb74dfc
 Built:             Thu May 25 21:51:00 2023
 OS/Arch:           linux/amd64
 Context:           default

docker info

docker info
Client: Docker Engine - Community
 Version:    24.0.2
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.10.5
    Path:     /usr/lib/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.18.1
    Path:     /usr/lib/docker/cli-plugins/docker-compose
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.0
    Path:     /usr/lib/docker/cli-plugins/docker-dev
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.19
    Path:     /usr/lib/docker/cli-plugins/docker-extension
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v0.1.0-beta.4
    Path:     /usr/lib/docker/cli-plugins/docker-init
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     /usr/lib/docker/cli-plugins/docker-sbom
  scan: Docker Scan (Docker Inc.)
    Version:  v0.26.0
    Path:     /usr/lib/docker/cli-plugins/docker-scan
  scout: Command line tool for Docker Scout (Docker Inc.)
    Version:  v0.12.0
    Path:     /usr/lib/docker/cli-plugins/docker-scout

Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info

Additional Info

No response

@xibaoning xibaoning changed the title Ubuntu 22.04.2 LTS always Starting the Docker Engine.... Ubuntu 22.04.2 LTS always Starting the Docker Engine Cannot connect to the Docker daemon at unix:///var/run/docker.sock Jun 25, 2023
@juliancervos
Copy link

juliancervos commented Jul 19, 2023

I have the exact same issue, also on Ubuntu 22.04.2 LTS, and with almost the exact same versions for the rest of things (e.g. docker version 24.0.4...). Seems to be a problem with the location of the socket file (I can't find it at /var/run/docker.sock). Hope this gets fixed soon.

Check this thread, it seems to be related:

In Ubuntu 22.04, it might have an issue with the iptables version. When checking the status, it might still show up not running. Hence, please make sure to switch the iptables to legacy.

To switch to iptables-legacy, run the below command to change the default iptables version. sudo update-alternatives --config iptables

Then re-start docker service sudo service docker start

And check docker status again with sudo service docker status

If this can solve your problem, please close the issue.

EDIT: I uninstalled all docker components and performed a clean installation of docker desktop for Ubuntu 22.04.2. After that, the errors that you show are gone (e.g. the Server: ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? errors pretty printing info when executing $ docker info).
However, I still get the same response as you if I execute it with root access (so $ sudo docker info)... not sure why, though.

@bwomsm1
Copy link

bwomsm1 commented Sep 24, 2024

Guys,
I am getting the same issue when I am running on Mac OS 15.
Any ideas how to solve it?

@laurazard
Copy link
Collaborator

Since this issue is a mixed bag of different reports (@xibaoning reported issues with Docker Desktop for Linux, @juliancervos seems to have partially addressed their issues and @bwomsm1 had a different issue which was clarified in another ticket), I'll close this one.

If any of you are still experiencing issues, please open a new issue with the information requested in the issue form.

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

No branches or pull requests

4 participants