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

config.json: no such file or directory #1021

Closed
galkinrost opened this issue Jan 18, 2017 · 33 comments
Closed

config.json: no such file or directory #1021

galkinrost opened this issue Jan 18, 2017 · 33 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@galkinrost
Copy link

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:

@r2d4
Copy link
Contributor

r2d4 commented Jan 19, 2017

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

@r2d4 r2d4 added the kind/bug Categorizes issue or PR as related to a bug. label Jan 19, 2017
@KJX16
Copy link

KJX16 commented Jan 19, 2017

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

@galkinrost
Copy link
Author

galkinrost commented Jan 20, 2017

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

@KJX16
Copy link

KJX16 commented Jan 20, 2017

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

@arifcse019
Copy link

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

@r2d4
Copy link
Contributor

r2d4 commented Feb 22, 2017

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

@r2d4
Copy link
Contributor

r2d4 commented Feb 22, 2017

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

@imranrazakhan
Copy link

imranrazakhan commented Jun 5, 2017

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

@michaelrempel
Copy link

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\config\config.json: open
C:\Users\Michael.minikube\config\config.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>

@michaelrempel
Copy link

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.

@richburdon
Copy link

Same problem with minikube delete

@tomtsang
Copy link

tomtsang commented Aug 5, 2017

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

@AdamCanady
Copy link

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.

@SachGupta
Copy link

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

"touch config.json"

@fejta-bot
Copy link

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

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 4, 2018
@timoreimann
Copy link

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.

@fejta-bot
Copy link

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

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 10, 2018
@fejta-bot
Copy link

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

@timoreimann
Copy link

/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.

@k8s-ci-robot
Copy link
Contributor

@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.

@cons0l3
Copy link

cons0l3 commented Apr 2, 2018

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.

@bastijnv
Copy link

bastijnv commented Apr 5, 2018

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

@aczelcs
Copy link

aczelcs commented May 2, 2018

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

@paulinalei
Copy link

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

@adolghiu
Copy link

adolghiu commented Jul 16, 2018

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

C:> copy "C:\Users<Windows UserID>.minikube\profiles\minikube\config.json" "C:\Users<Windows UserID>.minikube\config\config.json"
OR
C:> copy "C:\Users<Windows UserID>.minikube\machines\minikube\config.json" "C:\Users<Windows UserID>.minikube\config\config.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<Windows UserID>.minikube\cache\iso'
NOTE-2: kubeconfig: C:\Users<Windows UserID>/.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

@GaTechThomas
Copy link

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.

@ghost
Copy link

ghost commented Jan 25, 2019

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

@TimVanMourik
Copy link

TimVanMourik commented Feb 14, 2019

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.

@tuckerthomas
Copy link

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...

@Srinivas289
Copy link

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.

@eashi
Copy link

eashi commented Jul 5, 2020

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.

@ParasolGao
Copy link

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

But I can't delete .minikube.The system tells me I have no privilege to delete it. :(

@sumant5476
Copy link

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

Worked for me Thanks! @r2d4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests