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

Error in driver during machine creation: IP address never found in dhcp leases file Temporary Error: Could not find an IP address for <mac> #2430

Closed
jicowan opened this issue Jan 15, 2018 · 16 comments
Labels
co/hyperkit Hyperkit related issues kind/bug Categorizes issue or PR as related to a bug. os/macos

Comments

@jicowan
Copy link

jicowan commented Jan 15, 2018

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

Please provide the following details:

Environment:

Minikube version (use minikube version): v0.24.1

  • OS (e.g. from /etc/os-release): Darwin Kernel Version 16.6.0
  • VM Driver (e.g. cat ~/.minikube/machines/minikube/config.json | grep DriverName): kyperkit
  • ISO version (e.g. cat ~/.minikube/machines/minikube/config.json | grep -i ISO or minikube ssh cat /etc/VERSION): minikube-v0.23.6.iso
  • Install tools: curl
  • Others:
    The above can be generated in one go with the following commands (can be copied and pasted directly into your terminal):
minikube version
echo "";
echo "OS:";
cat /etc/os-release
echo "";
echo "VM driver": 
grep DriverName ~/.minikube/machines/minikube/config.json
echo "";
echo "ISO version";
grep -i ISO ~/.minikube/machines/minikube/config.json

What happened:
Received the following error when starting minikube:
E0115 11:20:51.968242 82457 start.go:156] Error starting host: Error creating host: Error creating machine: Error in driver during machine creation: IP address never found in dhcp leases file Temporary Error: Could not find an IP address for da:d7:e9:90:e3:a4

What you expected to happen:
Should expect minikube to start

How to reproduce it (as minimally and precisely as possible):
#: minikube start --vm-driver=hyperkit

Output of minikube logs (if applicable):
minikube start --vm-driver=hyperkit -v 10
Aliases:
Aliases:
map[string]string{}
Override:
map[string]interface {}{"v":"10"}
PFlags:
map[string]viper.FlagValue{"kvm-network":viper.pflagValue{flag:(*pflag.Flag)(0xc4201c34a0)}, "extra-config":viper.pflagValue{flag:(*pflag.Flag)(0xc4201c3e00)}, "container-runtime":viper.pflagValue{flag:(*pflag.Flag)(0xc4201c3b80)}, "disable-driver-mounts":viper.pflagValue{flag:(*pflag.Flag)(0xc4201c2b40)}, "docker-opt":viper.pflagValue{flag:(*pflag.Flag)(0xc4201c37c0)}, "mount-string":viper.pflagValue{flag:(*pflag.Flag)(0xc4201c2aa0)}, "registry-mirror":viper.pflagValue{flag:(*pflag.Flag)(0xc4201c3a40)}, "vm-driver":viper.pflagValue{flag:(*pflag.Flag)(0xc4201c2dc0)}, "cpus":viper.pflagValue{flag:(*pflag.Flag)(0xc4201c3180)}, "disk-size":viper.pflagValue{flag:(*pflag.Flag)(0xc4201c32c0)}, "memory":viper.pflagValue{flag:(*pflag.Flag)(0xc4201c2f00)}, "cache-images":viper.pflagValue{flag:(*pflag.Flag)(0xc4201c3d60)}, "feature-gates":viper.pflagValue{flag:(*pflag.Flag)(0xc4201c3cc0)}, "kubernetes-version":viper.pflagValue{flag:(*pflag.Flag)(0xc4201c3ae0)}, "dns-domain":viper.pflagValue{flag:(*pflag.Flag)(0xc4201c3900)}, "host-only-cidr":viper.pflagValue{flag:(*pflag.Flag)(0xc4201c3360)}, "insecure-registry":viper.pflagValue{flag:(*pflag.Flag)(0xc4201c39a0)}, "network-plugin":viper.pflagValue{flag:(*pflag.Flag)(0xc4201c3c20)}, "bootstrapper":viper.pflagValue{flag:(*pflag.Flag)(0xc4200b34a0)}, "profile":viper.pflagValue{flag:(*pflag.Flag)(0xc4200b30e0)}, "iso-url":viper.pflagValue{flag:(*pflag.Flag)(0xc4201c2c80)}, "keep-context":viper.pflagValue{flag:(*pflag.Flag)(0xc4201c2820)}, "docker-env":viper.pflagValue{flag:(*pflag.Flag)(0xc4201c3680)}, "apiserver-name":viper.pflagValue{flag:(*pflag.Flag)(0xc4201c3860)}, "hyperv-virtual-switch":viper.pflagValue{flag:(*pflag.Flag)(0xc4201c3400)}, "mount":viper.pflagValue{flag:(*pflag.Flag)(0xc4201c2960)}, "xhyve-disk-driver":viper.pflagValue{flag:(*pflag.Flag)(0xc4201c3540)}}
Env:
map[string]string{}
Key/Value Store:
map[string]interface {}{}
Config:
map[string]interface {}{"wantreporterror":true}
Defaults:
map[string]interface {}{"reminderwaitperiodinhours":24, "wantreporterror":false, "wantreporterrorprompt":true, "wantupdatenotification":true, "showdriverdeprecationnotification":true, "v":"0", "alsologtostderr":"false", "log_dir":"", "wantkubectldownloadmsg":true}
Starting local Kubernetes v1.8.0 cluster...
Starting VM...
Found binary path at /usr/local/bin/docker-machine-driver-hyperkit
Launching plugin server for driver hyperkit
Plugin server listening at address 127.0.0.1:60459
() Calling .GetVersion
Using API Version 1
() Calling .SetConfigRaw
() Calling .GetMachineName
(minikube) Calling .GetMachineName
(minikube) Calling .DriverName
(minikube) Calling .DriverName
Running pre-create checks...
(minikube) Calling .PreCreateCheck
(minikube) Calling .GetConfigRaw
Creating machine...
(minikube) Calling .Create
(minikube) Downloading /Users/jicowan/.minikube/cache/boot2docker.iso from file:///Users/jicowan/.minikube/cache/iso/minikube-v0.23.6.iso...
(minikube) DBG | 2018/01/15 11:19:49 [INFO] Creating ssh key...
(minikube) DBG | 2018/01/15 11:19:49 [INFO] Creating raw disk image...
(minikube) DBG | Writing magic tar header
(minikube) DBG | Writing SSH key tar header
(minikube) Generated UUID 4ac06202-fa18-11e7-812d-c4b301c6a74b
(minikube) Generated MAC da:d7:e9:90:e3:a4
(minikube) Starting with cmdline: loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=minikube

E0115 11:20:51.968242 82457 start.go:156] Error starting host: Error creating host: Error creating machine: Error in driver during machine creation: IP address never found in dhcp leases file Temporary Error: Could not find an IP address for da:d7:e9:90:e3:a4
Temporary Error: Could not find an IP address for da:d7:e9:90:e3:a4
Temporary Error: Could not find an IP address for da:d7:e9:90:e3:a4
Temporary Error: Could not find an IP address for da:d7:e9:90:e3:a4
Temporary Error: Could not find an IP address for da:d7:e9:90:e3:a4

Anything else do we need to know:
I have a dhcpd_leases file, but it is not updating.

@jicowan
Copy link
Author

jicowan commented Jan 15, 2018

On subsequent attempts to start minikube with the hyperkit driver, I get the following errors:
Using SSH client type: native
&{{{ 0 [] [] []} docker [0x1437740] 0x14376f0 [] 0s} 22 }
About to run SSH command:
exit 0
Error dialing TCP: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
Error dialing TCP: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
Error dialing TCP: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

@zoidyzoidzoid
Copy link
Contributor

Duplicate of #1926?

@jicowan
Copy link
Author

jicowan commented Jan 16, 2018

Seems like it. I couldn't tell if there was a fix or workaround from reading through the thread. @alanbrent says he got it to work by deleting hyperkit.pid, but that file doesn't exist on my system. I tried deleting dhcpd_leases and re-installing the hyperkit driver, but that had no effect. The dhcpd_leases file wasn't re-created either.

@slatunje
Copy link

I am facing the same issue as @jicowan and I .minikube/machines/minikube/hyperkit.pid did not exist either

@alanbrent
Copy link

@slatunje @jicowan it appears that the cases not covered by the workaround I found should have been fixed in the 0.25.0 release. Specifically PR #2417 should have fixed it.

@r2d4 r2d4 added kind/bug Categorizes issue or PR as related to a bug. co/hyperkit Hyperkit related issues labels Mar 5, 2018
@jicowan
Copy link
Author

jicowan commented Mar 24, 2018

This is still an issue with the latest versions of minikube and the hyperkit driver.

@bpasson
Copy link
Contributor

bpasson commented Mar 27, 2018

PR #2417 only fixed the issue of minikube getting assigned a new IP on every stop/stop cycle. Minikube not being able to find the IP address of the machine is a different problem.

@joeljohnston
Copy link

joeljohnston commented Apr 12, 2018

I'm having this problem as well. Started as soon as I installed minikube 0.25.2. Can't workaround or resolve. I've uninstalled Docker for Mac, the hyperkit driver, the xhyve driver, deleted the .files in ~/ and reinstalled all from scratch. No effect. Please advise.

@lokeshmadan
Copy link

I am in the same boat. Any update on this ?

@ctaggart
Copy link

I ran into this issue on v0.23.0, but not on v0.25.0.

@n3ur0m4nc3r
Copy link

n3ur0m4nc3r commented Jun 6, 2018

I'm experiencing this in v0.26.1 and v0.27.0 is there a fix/workaround for the issue?

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

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 Sep 4, 2018
@huguesalary
Copy link
Contributor

I've been running into this issue on and off for the longest time.

Today after hours of bumping my head against the wall, I realized what the bug is. I do not know what causes it though, but at least here's a lead:

When you run minikube start, you will see:

Using UUID 1398ae48-9515-11e8-a435-9801a79d827d
Generated MAC e:6:21:a2:d0:10

Now, if you cat /var/db/dhcpd_leases you will notice a new entry, however, the new entry will not match the "Generated MAC"

The new entry will look like

{
        name=minikube
        ip_address=192.168.64.73
        hw_address=1,to:to:ll:y:wrong:mac:address
        identifier=1,to:to:ll:y:wrong:mac:address
        lease=0x5b9ae147
}

One work around you can use right now to fix the issue is to manually specify a UUID and MAC address, here's how:

edit ~/.minikube/machines/minikube/config.json search for UUID and set the value to 1398ae48-9515-11e8-a435-9801a79d827d

edit /var/db/dhcpd_leases and add the following entry:

{
        name=minikube
        ip_address=192.168.64.73
        hw_address=1,e:6:21:a2:d0:10
        identifier=1,e:6:21:a2:d0:10
        lease=0x5b9ae147
}

You might need to change the IP Address to something else.

Now start your minikube again and it should finally find the IP.

@bpasson
Copy link
Contributor

bpasson commented Sep 13, 2018

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 13, 2018
@bpasson
Copy link
Contributor

bpasson commented Sep 13, 2018

It seems to be a weird problem as the generated mac is supplied to hyperkit to use for the virtual machine. You'd expect hyperkit to then use that mac to get an ip using dhcp. Maybe something changed in the hyperkit driver. At least worth investigating.

@tstromberg tstromberg changed the title Could not find an IP address with Hyperkit driver Error in driver during machine creation: IP address never found in dhcp leases file Temporary Error: Could not find an IP address for <mac> Sep 19, 2018
@tstromberg
Copy link
Contributor

This issue appears to be a dupe of #1926

It's worth noting that this seems to be a fairly widespread issue for HyperKit users, and one we plan to prioritize the resolution of. My apologies for the inconvenience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/hyperkit Hyperkit related issues kind/bug Categorizes issue or PR as related to a bug. os/macos
Projects
None yet
Development

No branches or pull requests