Skip to content

sudo service docker start can result in error "Failed to start docker.service: Unit docker.service not found." #572

Closed

Description

@peterzahemszky

When following the README.rst document, the sudo service docker start command fails with the following error:

Failed to start docker.service: Unit docker.service not found.

Docker version 20.10.8 (installed via Snap)
Operating system: Kubuntu 18.04

Activity

  1. peterzahemszky commented on Nov 18, 2021

    @peterzahemszky
    ContributorAuthor

    For the record, running docker info prints the following error message:

    Client:
     Context:    default
     Debug Mode: false
    
    Server:
    ERROR: 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
    errors pretty printing info
    

    Then if I run sudo usermod -a -G docker $USER as suggested by this comment on Stack Overflow, I get the following error:

    usermod: group 'docker' does not exist
    

    Running sudo docker info does not trigger the error message above.

  2. peterzahemszky commented on Nov 18, 2021

    @peterzahemszky
    ContributorAuthor

    I followed the steps described in the "Manage Docker as a non-root user" section of https://docs.docker.com/engine/install/linux-postinstall/, but it didn't resolve the problem for me (even after logging out of the session and logging back in)

  3. peterzahemszky commented on Nov 18, 2021

    @peterzahemszky
    ContributorAuthor

    Reinstalling Docker using the Docker repository (e.g. following the steps described here) resolved the issue for me

  4. amk-7 commented on Nov 6, 2022

    @amk-7

    Hello. When I run docker info I see then:
    Client:
    Context: default
    Debug Mode: false
    Plugins:
    app: Docker App (Docker Inc., v0.9.1-beta3)
    buildx: Docker Buildx (Docker Inc., v0.9.1-docker)
    compose: Docker Compose (Docker Inc., v2.12.1)
    dev: Docker Dev Environments (Docker Inc., v0.0.3)
    extension: Manages Docker extensions (Docker Inc., v0.2.13)
    sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
    scan: Docker Scan (Docker Inc., v0.21.0)

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

    Please can you help me ?

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions