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

master: The container name "/minikube" is already in use by container #6899

Closed
tstromberg opened this issue Mar 5, 2020 · 2 comments · Fixed by #6906
Closed

master: The container name "/minikube" is already in use by container #6899

tstromberg opened this issue Mar 5, 2020 · 2 comments · Fixed by #6906
Assignees
Labels
co/docker-driver Issues related to kubernetes in container kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@tstromberg
Copy link
Contributor

To replicate:

  • Run minikube start while Docker is coming up. It errors out with 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 Error response from daemon: dial unix docker.raw.sock: connect: connection refused

  • Run minikube startt once Docker is up:

💣  Unable to start VM. Please investigate and run 'minikube delete' if possible: creating host: create: creating: create kic node: create a kic node: args: [run -d -t --privileged --security-opt seccomp=unconfined --tmpfs /tmp --tmpfs /run -v /lib/modules:/lib/modules:ro --hostname minikube --name minikube --label created_by.minikube.sigs.k8s.io=true --label name.minikube.sigs.k8s.io=minikube --label role.minikube.sigs.k8s.io= --label mode.minikube.sigs.k8s.io=minikube --volume minikube:/var --cpus=2 --memory=6000mb --expose 8443 --publish=127.0.0.1::8443 --publish=127.0.0.1::22 --publish=127.0.0.1::2376 gcr.io/k8s-minikube/kicbase:v0.0.7@sha256:a6f288de0e5863cdeab711fa6bafa38ee7d8d285ca14216ecf84fcfb07c7d176]  output: [docker: Error response from daemon: Conflict. The container name "/minikube" is already in use by container "8f989d183f9a10ec0bc0f2061abdf32be34daeebe5f59049a22908b80c1bffde". You have to remove (or rename) that container to be able to reuse that name. See 'docker run --help'.] : exit status 125

If you run minikube start again, it gets stuck here instead:

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 Error response from daemon: dial unix docker.raw.sock: connect: connection refused
@medyagh
Copy link
Member

medyagh commented Mar 5, 2020

I was able to reproduce this bug this way:
it should be do-able to write an integration test for it.

medya@~/workspace/minikube (master) $ docker kill 8f47e4ec187d
8f47e4ec187d
medya@~/workspace/minikube (master) $ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
medya@~/workspace/minikube (master) $ docker ps -a
CONTAINER ID        IMAGE                                COMMAND                  CREATED             STATUS                       PORTS               NAMES
8f47e4ec187d        gcr.io/k8s-minikube/kicbase:v0.0.7   "/usr/local/bin/entr…"   2 minutes ago       Exited (137) 5 seconds ago                       minikube


medya@~/workspace/minikube (master) $ rm -rf ~/.minikube/profiles/minikube/
medya@~/workspace/minikube (master) $ ./out/minikube start --vm-driver=docker

😄  minikube v1.7.3 on Darwin 10.14.6
✨  Using the docker driver based on user configuration
🔥  Creating Kubernetes in docker container with (CPUs=2) (8 available), Memory=4096MB (7963MB available) ...

💣  Unable to start VM. Please investigate and run 'minikube delete' if possible: creating host: create: creating: create kic node: create a kic node: args: [run -d -t --privileged --security-opt seccomp=unconfined --tmpfs /tmp --tmpfs /run -v /lib/modules:/lib/modules:ro --hostname minikube --name minikube --label created_by.minikube.sigs.k8s.io=true --label name.minikube.sigs.k8s.io=minikube --label role.minikube.sigs.k8s.io= --label mode.minikube.sigs.k8s.io=minikube --volume minikube:/var --cpus=2 --memory=4096mb --expose 8443 --publish=127.0.0.1::8443 --publish=127.0.0.1::22 --publish=127.0.0.1::2376 gcr.io/k8s-minikube/kicbase:v0.0.7@sha256:a6f288de0e5863cdeab711fa6bafa38ee7d8d285ca14216ecf84fcfb07c7d176]  output: [docker: Error response from daemon: Conflict. The container name "/minikube" is already in use by container "8f47e4ec187d722bdc748714c29cd7e8ec35a4a4dee5d39c77db050c020eda3f". You have to remove (or rename) that container to be able to reuse that name. See 'docker run --help'.] : exit status 125

😿  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 medyagh self-assigned this Mar 5, 2020
@medyagh medyagh added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. kind/bug Categorizes issue or PR as related to a bug. co/docker-driver Issues related to kubernetes in container labels Mar 5, 2020
@medyagh
Copy link
Member

medyagh commented Mar 5, 2020

I will make a PR for this hopefully to be in this release

This issue was closed.
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. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants