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

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

Closed
peterzahemszky opened this issue Nov 18, 2021 · 4 comments · Fixed by #573
Assignees
Labels

Comments

@peterzahemszky
Copy link
Contributor

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

@peterzahemszky
Copy link
Contributor Author

peterzahemszky commented Nov 18, 2021

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.

@peterzahemszky
Copy link
Contributor Author

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)

@peterzahemszky peterzahemszky self-assigned this Nov 18, 2021
@peterzahemszky
Copy link
Contributor Author

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

@amk-7
Copy link

amk-7 commented Nov 6, 2022

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
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants