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

none with snap installed docker: sudo systemctl start docker: exit status 5 #4952

Closed
dfang opened this issue Aug 2, 2019 · 13 comments
Closed
Labels

Comments

@dfang
Copy link
Contributor

dfang commented Aug 2, 2019

on ubuntu 18.04,

docker installed by snap,

snap install docker --classic

minikube installed from kubernetes/minikube releases.

curl -Lo minikube https://storage.googleapis.com/minikube/releases/v1.2.0/minikube-linux-amd64 && chmod +x minikube && sudo cp minikube /usr/local/bin/ && rm minikube
minikube start --vm-driver=none
😄  minikube v1.2.0 on linux (amd64)
💡  Tip: Use 'minikube start -p <name>' to create a new cluster, or 'minikube delete' to delete this one.
🔄  Restarting existing none VM for "minikube" ...
⌛  Waiting for SSH access ...

💣  Failed to enable container runtime: running command: sudo systemctl start docker: exit status 5

😿  Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
👉  https://github.com/kubernetes/minikube/issues/new
@afbjorklund
Copy link
Collaborator

What does sudo systemctl status docker say ?

And do you see more of the actual issue, if you run minikube with -v8 --alsologtostderr

@RA489
Copy link

RA489 commented Aug 2, 2019

@dfang Did you added your user to the docker group?

@afbjorklund
Copy link
Collaborator

@dfang Did you added your user to the docker group?

@RA489: Why would that be needed to control the service ?

@RA489
Copy link

RA489 commented Aug 2, 2019

@afbjorklund Just trying to reproduce the issue on ubuntu 18.04.

@afbjorklund
Copy link
Collaborator

I suspect the snap installation is incompatible, and would suggest using the normal apt installation.

https://docs.docker.com/install/linux/docker-ce/ubuntu/

@RA489
Copy link

RA489 commented Aug 2, 2019

Yeah it is working fine if we install via normal apt installation.

@dfang
Copy link
Contributor Author

dfang commented Aug 2, 2019

I suspect the snap installation is incompatible, and would suggest using the normal apt installation.

https://docs.docker.com/install/linux/docker-ce/ubuntu/

yes, i switch to docker one-line script installer

curl -sSL https://get.docker.com/ | sh

@dfang
Copy link
Contributor Author

dfang commented Aug 2, 2019

What does sudo systemctl status docker say ?

And do you see more of the actual issue, if you run minikube with -v8 --alsologtostderr

i switched to one-line script installer

curl -sSL https://get.docker.com/ | sh

no errors in systemctl status docker output

@dfang dfang changed the title minikube start failed on ubuntu 18.04 minikube start failed on ubuntu 18.04 with snap installed docker Aug 2, 2019
@dfang
Copy link
Contributor Author

dfang commented Aug 2, 2019

What does sudo systemctl status docker say ?

And do you see more of the actual issue, if you run minikube with -v8 --alsologtostderr

root@i-m3k2jb32:~# minikube start --vm-driver=none
😄  minikube v1.2.0 on linux (amd64)
🔥  Creating none VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
E0802 17:42:04.707243    9684 start.go:559] StartHost: create: precreate: exec: "docker": executable file not found in $PATH

💣  Unable to start VM: create: precreate: exec: "docker": executable file not found in $PATH

😿  Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
👉  https://github.com/kubernetes/minikube/issues/new
root@i-m3k2jb32:~# snap install docker --classic
Warning: flag --classic ignored for strictly confined snap docker

docker 18.06.1-ce from Canonical✓ installed
root@i-m3k2jb32:~# minikube start --vm-driver=none
😄  minikube v1.2.0 on linux (amd64)
🔥  Creating none VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...

💣  Failed to enable container runtime: running command: sudo systemctl start docker: exit status 5

😿  Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
👉  https://github.com/kubernetes/minikube/issues/new
root@i-m3k2jb32:~# sudo systemctl status docker
Unit docker.service could not be found.
root@i-m3k2jb32:~# sudo systemctl start docker
Failed to start docker.service: Unit docker.service not found.

@dfang
Copy link
Contributor Author

dfang commented Aug 2, 2019

@dfang Did you added your user to the docker group?

no, login and install docker as root user, no need to add to docker group

@dfang
Copy link
Contributor Author

dfang commented Aug 2, 2019

on ubuntu 18.04,

minikube installed by

curl -Lo minikube https://storage.googleapis.com/minikube/releases/v1.2.0/minikube-linux-amd64 && chmod +x minikube && sudo cp minikube /usr/local/bin/ && rm minikube

docker installed by

curl -sSL https://get.docker.com/ | sh
minikube start --vm-driver=none
😄  minikube v1.2.0 on linux (amd64)
💡  Tip: Use 'minikube start -p <name>' to create a new cluster, or 'minikube delete' to delete this one.
🔄  Restarting existing none VM for "minikube" ...
⌛  Waiting for SSH access ...
🐳  Configuring environment for Kubernetes v1.15.0 on Docker 19.03.1
    ▪ kubelet.resolv-conf=/run/systemd/resolve/resolv.conf
💾  Downloading kubeadm v1.15.0
💾  Downloading kubelet v1.15.0
🔄  Relaunching Kubernetes v1.15.0 using kubeadm ...

💣  Error restarting cluster: waiting for apiserver: timed out waiting for the condition

😿  Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
👉  https://github.com/kubernetes/minikube/issues/new
❌  Problems detected in "kube-addon-manager":
    error: unable to recognize "STDIN": Get https://localhost:8443/api?timeout=32s: dial tcp [::1]:8443: connect: connection refused
    error: unable to recognize "STDIN": Get https://localhost:8443/api?timeout=32s: dial tcp [::1]:8443: connect: connection refused
    error: unable to recognize "STDIN": Get https://localhost:8443/api?timeout=32s: dial tcp [::1]:8443: connect: connection refused

@dfang
Copy link
Contributor Author

dfang commented Aug 2, 2019

start again with same command, no errors

root@i-m3k2jb32:~# minikube start --vm-driver=none
😄  minikube v1.2.0 on linux (amd64)
💡  Tip: Use 'minikube start -p <name>' to create a new cluster, or 'minikube delete' to delete this one.
🔄  Restarting existing none VM for "minikube" ...
⌛  Waiting for SSH access ...
🐳  Configuring environment for Kubernetes v1.15.0 on Docker 19.03.1
    ▪ kubelet.resolv-conf=/run/systemd/resolve/resolv.conf
🔄  Relaunching Kubernetes v1.15.0 using kubeadm ...
🤹  Configuring local host environment ...

⚠️  The 'none' driver provides limited isolation and may reduce system security and reliability.
⚠️  For more information, see:
👉  https://github.com/kubernetes/minikube/blob/master/docs/vmdriver-none.md

⚠️  kubectl and minikube configuration will be stored in /root
⚠️  To use kubectl or minikube commands as your own user, you may
⚠️  need to relocate them. For example, to overwrite your own settings:

    ▪ sudo mv /root/.kube /root/.minikube $HOME
    ▪ sudo chown -R $USER $HOME/.kube $HOME/.minikube

💡  This can also be done automatically by setting the env var CHANGE_MINIKUBE_NONE_USER=true
⌛  Verifying: apiserver proxy etcd scheduler controller dns
🏄  Done! kubectl is now configured to use "minikube"

but pod/kube-controller-manager-minikube CrashLoopBackOff

root@i-m3k2jb32:~# kubectl get all --all-namespaces
NAMESPACE     NAME                                   READY   STATUS             RESTARTS   AGE
kube-system   pod/coredns-5c98db65d4-2m775           1/1     Running            0          13m
kube-system   pod/coredns-5c98db65d4-g7vbx           1/1     Running            0          13m
kube-system   pod/etcd-minikube                      1/1     Running            0          21m
kube-system   pod/kube-addon-manager-minikube        1/1     Running            0          22m
kube-system   pod/kube-apiserver-minikube            1/1     Running            2          22m
kube-system   pod/kube-controller-manager-minikube   0/1     CrashLoopBackOff   10         6m1s
kube-system   pod/kube-proxy-6xf4s                   1/1     Running            1          13m
kube-system   pod/kube-scheduler-minikube            1/1     Running            0          22m
kube-system   pod/storage-provisioner                1/1     Running            7          22m
kube-system   pod/tiller-deploy-75f6c87b87-kql7q     0/1     Running            0          17m


NAMESPACE     NAME                    TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                  AGE
default       service/kubernetes      ClusterIP   10.96.0.1       <none>        443/TCP                  23m
kube-system   service/kube-dns        ClusterIP   10.96.0.10      <none>        53/UDP,53/TCP,9153/TCP   13m
kube-system   service/tiller-deploy   ClusterIP   10.97.168.209   <none>        44134/TCP                17m

NAMESPACE     NAME                        DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR                 AGE
kube-system   daemonset.apps/kube-proxy   1         1         1       1            1           beta.kubernetes.io/os=linux   13m

NAMESPACE     NAME                            READY   UP-TO-DATE   AVAILABLE   AGE
kube-system   deployment.apps/coredns         2/2     2            2           13m
kube-system   deployment.apps/tiller-deploy   0/1     1            0           17m

NAMESPACE     NAME                                       DESIRED   CURRENT   READY   AGE
kube-system   replicaset.apps/coredns-5c98db65d4         2         2         2       13m
kube-system   replicaset.apps/tiller-deploy-75f6c87b87   1         1         0       17m

give up on running Minikube on ubuntu 18.04, I'll close this issue

@dfang dfang closed this as completed Aug 2, 2019
@afbjorklund
Copy link
Collaborator

afbjorklund commented Aug 2, 2019

@dfang: Thank you for reporting the issues when using docker installed using a snap!
We should probably add that to the documentation for the advanced none driver:

https://github.com/kubernetes/minikube/blob/master/docs/vmdriver-none.md

We should probably give a better solution message, when the runtime is missing.
i.e. if you choose docker, then you need docker. That is not really a "crash".

Unable to start VM: create: precreate: exec: "docker": executable file not found in $PATH

give up on running Minikube on ubuntu 18.04, I'll close this issue

Sorry to hear that, welcome back if you want to try the regular VirtualBox installation
as a regular user (non-root). Or if you want to troubleshoot why this install didn't work.

@tstromberg tstromberg changed the title minikube start failed on ubuntu 18.04 with snap installed docker none fails with snap installed docker: sudo systemctl start docker: exit status 5 Apr 16, 2020
@tstromberg tstromberg changed the title none fails with snap installed docker: sudo systemctl start docker: exit status 5 none with snap installed docker: sudo systemctl start docker: exit status 5 Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants