Minikube: config.json: no such file or directory

Created on 18 Jan 2017  路  31Comments  路  Source: kubernetes/minikube

Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG

Minikube version (use minikube version): v0.15.0

Environment:

  • OS (e.g. from /etc/os-release): macOS 10.12
  • VM Driver (e.g. cat ~/.minikube/machines/minikube/config.json | grep DriverName): File doesn't exist
  • Docker version (e.g. docker -v): Docker version 1.12.6, build 78d1802
  • Install tools:
  • Others:

What happened:

$ minikube start
Starting local Kubernetes cluster...
E0118 13:29:31.839028    3722 start.go:96] Error starting host: Error loading existing host. Please try running [minikube delete], then run [minikube start] again.: open /Users/galkinrost/.minikube/machines/minikube/config.json: no such file or directory.

 Retrying.
E0118 13:29:31.839598    3722 start.go:102] Error starting host:  Error loading existing host. Please try running [minikube delete], then run [minikube start] again.: open /Users/galkinrost/.minikube/machines/minikube/config.json: no such file or directory

What you expected to happen:
Minikude successful starts

How to reproduce it (as minimally and precisely as possible):
I followed the steps described in this tutorial https://kubernetes.io/docs/tutorials/stateless-application/hello-minikube/

Anything else do we need to know:

kinbug lifecyclrotten

Most helpful comment

It's hard to guarantee in place upgrades from 0.6 to 0.15, so that's most likely not going to work. Your best option is to delete the minikube folder 'rm -from ~/.minikube' and perform a minikube start

All 31 comments

Can you try a minikube delete and then another minikube start?

I got the same problem on my Mac.
minikube start --vm-driver=xhyve
Starting local Kubernetes cluster...
E0119 15:42:15.639175 47872 start.go:96] Error starting host: Error loading existing host. Please try running [minikube delete], then run [minikube start] again.: open /Users/xyz/.minikube/machines/minikube/config.json: no such file or directory.

Retrying.
E0119 15:42:15.639841 47872 start.go:102] Error starting host: Error loading existing host. Please try running [minikube delete], then run [minikube start] again.: open /Users/xyz/.minikube/machines/minikube/config.json: no such file or directory
$ minikube delete
Deleting local Kubernetes cluster...
Errors occurred deleting machine: Error deleting host: minikube: open /Users/xyz/.minikube/machines/minikube/config.json: no such file or directory

Got the same error as @KJX16

$ minikube delete
Deleting local Kubernetes cluster...
Errors occurred deleting machine:  Error deleting host: minikube: open /Users/galkinrost/.minikube/machines/minikube/config.json: no such file or directory

interesting, It works when I accidentally used Minikube version 0.6.0, but not the versions 0.10.0 to 0.15.0.

Same error as @galkinrost. Environment

OS (e.g. from /etc/os-release): macOS 10.10.5
VM Driver (e.g. cat ~/.minikube/machines/minikube/config.json | grep DriverName): File doesn't exist
Docker version (e.g. docker -v): Docker version 1.13.1, build 092cba3

Using Minikube version 0.6.0 works as described by @KJX16

It's hard to guarantee in place upgrades from 0.6 to 0.15, so that's most likely not going to work. Your best option is to delete the minikube folder 'rm -from ~/.minikube' and perform a minikube start

You also may be able to just create an empty configure.json in the location it's looking for

creating empty configure.json doesnt work. just delete .minishift folder under user directory and it will work

I have to report the same problem. The file should be created if it doesnt exist. And the system should continue to try to create it if it isnt there. Windows 7 machine, 0.20 installed after trying 0.12.2 as per the book Mastering Kubernetes. A minimal contents set of the config.json file could be posted here as a workaround for now, but this is such a silly persistent problem that it is really annoying. By now it should be no surprise that the path exists, but the file itself is missing. My Powershell is set with the following aliases
Set-Alias -Name k -Value kubectl
function mk
{
minikube-windows-amd64 --show-libmachine-logs
--alsologtostderr `
@args
}
PS C:\Users\Michael> mk version
minikube : W0625 12:05:53.759723 8416 root.go:153] Error reading config file at C:\Users\Michael.minikube\configconfig.json: open
C:\Users\Michael.minikube\configconfig.json: The system cannot find the path specified.
At C:\Users\Michael\Documents\WindowsPowerShell\Microsoft.PowerShellISE_profile.ps1:3 char:14

  • function mk {minikube --show-libmachine-logs --alsologtostderr @args}
  • ~~~~~~~~~~~

    • CategoryInfo : NotSpecified: (W0625 12:05:53....path specified.:String) [], RemoteException

    • FullyQualifiedErrorId : NativeCommandError

minikube version: v0.20.0

PS C:\Users\Michael>

It appears to be a permissions problem. I defined the KUBECONFIG variable. I originally thought this would be a folder, but it turned out that the system was looking for a file. So I gave it an empty config.json file to look at and it was happy. You should consider creating a config/config.json file as a folder/file beneath the installed exe file location as default. As a minimum on install interactively check for write permissions in the destination folder and give a proper message. IMHO this should be seen as a bug fix, not a feature request.

Same problem with minikube delete

Same problem with minikube delete.
yes, @r2d4 was right. just "rm -rf ~/.minikube/". thank you, @r2d4 !

I was able to get past this error by deleting my ~/.minikube directory (OS X 10.11.6). Then minikube start had to download the ISO again.

Just create config.json file by going to the dire mentioned in message.

"touch config.json"

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale

FWIW, I am also missing the configuration file when installing and running a fresh minikube v0.24.1 on a cloud-based CI machine using the none driver. It doesn't really seem to affect my setup though apart from the somewhat confusing error message in the log.

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
/remove-lifecycle stale

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

/reopen

I believe this could still be addressed for the scenario I have described. If the maintainers feel otherwise, I'm okay to keep it closed.

@timoreimann: you can't re-open an issue/PR unless you authored it or you are assigned to it.

In response to this:

/reopen

I believe this could still be addressed for the scenario I have described. If the maintainers feel otherwise, I'm okay to keep it closed.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

minikube version: v0.25.2
windows 10

after a reboot minikube start --vm-driver=hyperv would not work. minkube delete complaint a missing config file (as above).

workaround: remove remove hyper-v virtual machine and remove .minikube folder; rerun minikube --vm-driver=hyperv as admin.

Had same issue. Empty config files did not work but removing .minikube folder as suggested by @cons0l3 does.

I had the same problem. I deleted the ./minikube/machines/minikube directory and I could start minikube again.

minikube version: v0.28.0
using Windows Server 2016
using Hyper-V

Deleted ./minikube directory, but still had trouble restarting minikube.
Sometimes had trouble stopping or deleting minikube. Had to manually delete using Hyper-V manager.
Reran minikube with --vm-driver=hyperv --hyperv-virtual-switch=(my switch) --logtostderr -v5
No errors showed up, but it began to hang at "Starting cluster components" Output below:

Starting cluster components...
I0629 09:34:16.895277 8000 ssh_runner.go:80] Run with output: sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests --ignore-preflight-errors=DirAvailable--data-minikube --ignore-preflight-errors=Port-10250 --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml --ignore-preflight-errors=Fil
eAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-etcd.yaml --ignore-preflight-errors=Swap --ignore-preflight-errors=CRI

Copy the configuration file 'config.json' from under 'profile' directory:

C:> copy "C:\Users\.minikube\profilesminikubeconfig.json" "C:\Users\.minikube\configconfig.json"
OR
C:> copy "C:\Users\.minikube\machinesminikubeconfig.json" "C:\Users\.minikube\configconfig.json"

Get the latest minikube version

C:> minikube get-k8s-versions
The following Kubernetes versions are available when using the localkube bootstrapper:
- v1.10.0
...

Start minikube

C:> minikube.exe start --kubernetes-version="v1.10.0" --vm-driver="virtualbox" --logtostderr
NOTE-1: Minikube ISO (~150MB) downloads under 'C:\Users\.minikube\cache\iso'
NOTE-2: kubeconfig: C:\Users\/.kube/config

In 'config.json' pay attention to:
"KubernetesConfig": {
"KubernetesVersion": "v1.10.0",

Usefull commands

C:> kubectl.exe version
C:> minikube.exe status
C:> kubectl.exe cluster-info

Kubernetes dashboard URL where you can connect using a browser

C:>minikube.exe dashboard --url=true

This issue still occurs. If we made an effort to improve the situation, would a pull be likely? Looking to help, but don't want to waste time.

I use Hyper-V driver. What worked for me was:

1) open Hyper-V manager
2) delete all the minikube machines from there
3) delete the folder .minikube
4) run minikube start --vm-driver=hyperv

if you skip step 1 and 2, you'll probably won't be able to delete the folder .minikube (for me, it was under C:\Users\user)

Hope this works for you all, folks

This seems to happen when you run minikube delete in a non-administrator terminal. To reproduce this error (Windows) I did:

  • Open non-admin Windows cmd
  • Back-up .minikube\machines\minikube\config.json
  • run minikube delete
  • part of the content of .minikube\machines\minikube\ including config.json is removed, but the command gives an error because it's run as non-admin
  • subsequent minikube deletes will complain about the non-existence of config.json with the message from the subject thread
  • restore .minikube\machines\minikube\config.json
  • Open admin Windows cmd
  • run minikube delete
  • Command behaves as expected

If you don't have the config.json backed up, you probably have to resort to the rather radical solution above.

Suggestion: It might be nice if the minikube checks admin rights before removing part of the .minikube folder to prevent this.

If you're on Windows and trying to user Hyper-V make sure systeminfo outputs:

Hyper-V Requirements:     VM Monitor Mode Extensions: Yes
                          Virtualization Enabled In Firmware: Yes
                          Second Level Address Translation: Yes
                          Data Execution Prevention Available: Yes

I was getting:

* Retriable failure: Error loading existing host. Please try running [minikube delete], then run [minikube start] again.: filestore "minikube": open C:\Users\tucker\.minikube\machines\minikube\config.json: The system cannot find the file specified.

I did a bios update recently and it defaulted VT-d off and that was causing the config file error since the VMs weren't starting. For example, Virtualization Enabled In Firmware: Yes was set to No.

Anyway, make sure VT-d is enabled in your BIOS if you've done an upgrade recently or haven't checked. Then open Hyper-V and delete any VMs minikube tried to make and do a minikube delete. After that, I did minikube start --vm-driver hyperv and its working like a charm.

I only say this after being _certain_ that I had VT-d on...

ran into same issue on windows, got over this, by
delete and start.

If you see error while deleting, go to Hyper-V Manager (through start) and remove minikube Virtual Machine, and try a delete couple of times.

In my case, the Name property in the config.json in profiles/[my-profile] folder was empty (I am not sure how). I put the name of the cluster and it worked again.

Was this page helpful?
0 / 5 - 0 ratings