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

docker driver: Improve error message on Linux with when docker socket is inaccessible #7605

Closed
balopat opened this issue Apr 11, 2020 · 4 comments · Fixed by #7694
Closed
Assignees
Labels
co/docker-driver Issues related to kubernetes in container kind/bug Categorizes issue or PR as related to a bug. needs-solution-message Issues where where offering a solution for an error would be helpful os/linux

Comments

@balopat
Copy link
Contributor

balopat commented Apr 11, 2020

On a fresh docker installation in Linux - I haven't yet set the docker group up - hence I would need to use sudo - however if I don't know this, I got this error message which is misleading:

  • it says to restart docker desktop 1) I'm on Linux - there is no Docker Desktop here 2) this is not the issue, the issue is the permission denied problem on the socket

We should report "Minikube can't access the Docker daemon, permission is denied. Suggestion: create the docker group to allow access and add $user to the group with sudo usermod -aG docker $USER" or something similar

minikube start --vm-driver=docker
😄  minikube v1.8.2 on Debian 9.11
✨  Using the docker driver based on user configuration

❗  'docker' driver reported an issue: exit status 1
💡  Suggestion: Docker is not running or is responding too slow. Try: restarting docker desktop.

💾  Downloading preloaded images tarball for k8s v1.17.3 ...
    > preloaded-images-k8s-v1-v1.17.3-docker-overlay2.tar.lz4: 499.26 MiB / 499
E0411 00:53:33.476159   13010 cache.go:106] Error downloading kic artifacts:  error loading image: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.24/images/load?quiet=0: dial unix /var/run/docker.sock: connect: permission denied
🔥  Creating Kubernetes in docker container with (CPUs=2) (0 available), Memory=2200MB (0MB available) ...

💣  Unable to start VM. Please investigate and run 'minikube delete' if possible: creating host: create: creating: create kic node: creating volume for minikube container: output Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.40/volumes/create: dial unix /var/run/docker.sock: connect: permission denied
: exit status 1

😿  minikube is exiting due to an error. If the above message is not useful, open an issue:
👉  https://github.com/kubernetes/minikube/issues/new/choose
@medyagh
Copy link
Member

medyagh commented Apr 11, 2020

we fixed this a few commits ago, this should be on the HEAD

@balopat

@medyagh
Copy link
Member

medyagh commented Apr 11, 2020

dupe of #7457 please let me know if the issue is still there

@medyagh medyagh closed this as completed Apr 11, 2020
@medyagh medyagh reopened this Apr 11, 2020
@afbjorklund
Copy link
Collaborator

afbjorklund commented Apr 11, 2020

Seems like duplicates:

  1. Docker Desktop on Linux Getting Started for Linux suggests non-existing Docker Desktop #7440
  2. docker.sock permission denied dial unix /var/run/docker.sock: connect: permission denied #7566

@afbjorklund afbjorklund added co/docker-driver Issues related to kubernetes in container os/linux triage/duplicate Indicates an issue is a duplicate of other open issue. labels Apr 11, 2020
@afbjorklund
Copy link
Collaborator

we fixed this a few commits ago, this should be on the HEAD

Now it looks like:

❗  'docker' driver reported an issue: "docker version --format {{.Server.Version}}" exit status 1: 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.40/version: dial unix /var/run/docker.sock: connect: permission denied
💡  Suggestion: 
📘  Documentation: https://minikube.sigs.k8s.io/docs/drivers/docker/

💣  Failed to validate 'docker' driver

@tstromberg tstromberg added the needs-solution-message Issues where where offering a solution for an error would be helpful label Apr 15, 2020
@tstromberg tstromberg self-assigned this Apr 15, 2020
@tstromberg tstromberg added kind/bug Categorizes issue or PR as related to a bug. and removed triage/duplicate Indicates an issue is a duplicate of other open issue. labels Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/docker-driver Issues related to kubernetes in container kind/bug Categorizes issue or PR as related to a bug. needs-solution-message Issues where where offering a solution for an error would be helpful os/linux
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants