minikube: hyperkit: IP address never found in dhcp leases file Temporary Error: Could not find an IP address for
Hi, minikube does not start on my mac, I tried multiple times to remove and reinstall Docker Desktop and docker-machine-driver-hyperkit without solving the problem. It’s not related to version 1.0.1, because the problem was present also with version 1.0.0 and maybe also with previous versions that I haven’t tested.
When I lanch minikube the /usr/local/bin/docker-machine-driver-hyperkit process appears in the process list, does not use CPU, and it’s still present for some time after the command exited.
Can you help me?
The exact command to reproduce the issue:
minikube stop; minikube delete ; rm -rf ~/.minikube
minikube config set vm-driver hyperkit
minikube start -v 10
The full output of the command that failed:
😄 minikube v1.0.1 on darwin (amd64)
💿 Downloading Minikube ISO ...
142.88 MB / 142.88 MB [============================================] 100.00% 0s
🤹 Downloading Kubernetes v1.14.1 images in the background ...
🔥 Creating hyperkit VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
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:54243
() Calling .GetVersion
Using API Version 1
() Calling .SetConfigRaw
() Calling .GetMachineName
(minikube) Calling .GetMachineName
(minikube) Calling .DriverName
Creating CA: /Users/user/.minikube/certs/ca.pem
Creating client certificate: /Users/user/.minikube/certs/cert.pem
Running pre-create checks...
(minikube) Calling .PreCreateCheck
(minikube) Calling .GetConfigRaw
Creating machine...
(minikube) Calling .Create
(minikube) Downloading /Users/user/.minikube/cache/boot2docker.iso from file:///Users/user/.minikube/cache/iso/minikube-v1.0.1.iso...
(minikube) DBG | 2019/05/04 17:33:26 [INFO] Creating ssh key...
(minikube) DBG | 2019/05/04 17:33:26 [INFO] Creating raw disk image...
(minikube) DBG | Writing magic tar header
(minikube) DBG | Writing SSH key tar header
(minikube) DBG | Mounting boot2docker.iso
(minikube) DBG | executing: &{/usr/bin/hdiutil [hdiutil attach /Users/user/.minikube/machines/minikube/boot2docker.iso -mountpoint /Users/user/.minikube/machines/minikube/b2d-image] [] <nil> 0xc42000e018 0xc42000e02
0 [] <nil> <nil> <nil> <nil> <nil> false [] [] [] [] <nil> <nil>} attach /Users/user/.minikube/machines/minikube/boot2docker.iso -mountpoint /Users/user/.minikube/machines/minikube/b2d-image
(minikube) /dev/disk3 /Users/user/.minikube/machines/minikube/b2d-image
(minikube) DBG | Extracting Kernel Options...
(minikube) DBG | Extracted Options "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=minikube"
(minikube) DBG | Extracting /Users/user/.minikube/machines/minikube/b2d-image/boot/bzImage into /Users/user/.minikube/machines/minikube/bzImage
(minikube) DBG | Extracting /Users/user/.minikube/machines/minikube/b2d-image/boot/initrd into /Users/user/.minikube/machines/minikube/initrd
(minikube) DBG | Unmounting boot2docker.iso
(minikube) DBG | executing: &{/usr/bin/hdiutil [hdiutil detach /Users/user/.minikube/machines/minikube/b2d-image] [] <nil> 0xc42000e018 0xc42000e020 [] <nil> <nil> <nil> <nil> <nil> false [] [] [] [] <nil> <nil>} de
tach /Users/user/.minikube/machines/minikube/b2d-image
(minikube) "disk3" ejected.
(minikube) Using UUID f59fbfd4-6e81-11e9-bb44-f01898eab608
(minikube) Generated MAC 4e:e8:f0:ac:b:3f
(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
💣 Unable to start VM: create: 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 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
Temporary Error: Could not find an IP address for 4e:e8:f0:ac:b:3f
😿 Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
👉 https://github.com/kubernetes/minikube/issues/new
The output of the minikube logs command:
💣 command runner: getting ssh client for bootstrapper: Error dialing tcp via ssh client: dial tcp :22: connect: connection refused
😿 Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
👉 https://github.com/kubernetes/minikube/issues/new
The operating system version:
macOS Mojave 10.14.4 (18E226) Darwin mac.local 18.5.0 Darwin Kernel Version 18.5.0: Mon Mar 11 20:40:32 PDT 2019; root:xnu-4903.251.3~3/RELEASE_X86_64 x86_
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 5
- Comments: 63 (10 by maintainers)
@rkrdo Are you using a vpn at the same time, or have a vpn client installed? In my case the problem is probably related to some weird interaction between minikube and vpn software. But for me it’s tricky to determine because it’s inconsistent, or at least i didn’t recognize a partern yet.
Same issue in Big Sur. I tried disconnecting from VPNs, tried the steps from @hughpearse but no luck
This is a duplicate of #1926 - the solution is to upgrade your hyperkit driver:
curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-hyperkit && sudo install -o root -g wheel -m 4755 docker-machine-driver-hyperkit /usr/local/bin/Then run
minikube delete && minikube start --vm-driver=hyperkitto recreate your VM.If this is still broken, please re-open the bug, and include the output of:
ls -la $(which docker-machine-driver-hyperkit)I will make sure we provide a more user friendly error message for this case. Thanks!
I also met the issue when I connected with my Cisco AnyConnect VPN. Resolved by disconnect the VPN.
Hello, colleagues. MacOs BigSur. I had the same issue with minishift and used recommendations from this topic to fix. I tried all options and this works for me (just use minikube instead of minishift):
@Downchuck the other alternative is to completely uninstall Homebrew packages of Docker and Hyperkit and instead install Docker Desktop for Mac:
https://github.com/kubernetes/minikube/issues/4206#issuecomment-605590333
I encountered this issue after upgrading from catalina to big sur. Tried a bunch of stuff and eventually got it working again. Not sure exactly what I did to fix it, but I can show everything:
Go to System Preferences > Security & Privacy > Firewall > [Firewall Options] > [ ] Enable stealth mode
And disable stealth mode if enabled.
I dont know for sure, but I suspect the fix was
brew install --cask --force minishiftRunning MacOS Big Sur 11.6.2 in a corporate environment which has the
pffirewall configured, have been experiencing this issue.I created a new pf rules file
/etc/pf.anchors/io.k8s.sigs.minikubeand whittled it down to the following rule:Unsure whether the
bridge100device is hard-coded or might change in future, would like to keep the rule as specific as possible.Reference the rules file in /etc/pf.conf:
To reload pf using the updated rules:
Cleared everything down with
minikube deletethen restartedminikube start, the following appears in the pflog0 tcpdump:The minikube starts successfully.
@tstromberg I encountered the same problem on macOS Catalina 10.15.4 :
On my machine, I had installed the following from homebrew:
brew install dockerbrew install docker-machinebrew install docker-machine-driver-hyperkitbrew install hyperkitto work around the problem, I uninstalled everything:
brew uninstall dockerbrew uninstall docker-machinebrew uninstall docker-machine-driver-hyperkitbrew uninstall hyperkitThen I Installed Docker Desktop for Mac from here: https://hub.docker.com/editions/community/docker-ce-desktop-mac/
After doing that, I had:
I did not install docker-machine or docker-machine-driver-hyperkit. It looks like Docker Desktop for Mac includes hyperkit.
At this point I was able to start docker containers and did not have the issue with the missing
/var/db/dhcpd_leasesfile.I encountered this error, but after some digging I discovered in my case the cause was bootpd being disabled (I had installed the ISC dhcpd at some point). Running the following resolved the issue:
Thanks @rkrdo, good to know!
I also have Little Snitch installed, and most of the times i have no issues, but sometimes especially a few months ago, if i’d recently connected or disconnetted from the vpn i was getting that error.
My opinion is that this issue is probably related to one ore more third party software that interact with the network stack, and interact badly with minikube’s dhcp (or hyperkit’s).
@colangelo thank you for the suggestion! it turned out it to be Little Snitch that was causing preventing
minikube-darwin-amd64from creating/writing to/var/db/dhcpd_leasesI’ve tried all the solutions with a Mac M1 with Monterey and the x86 (Rosetta) execution mode and I couldn’t get minishift or minikube working. It’s always something at the network adapter. My Mac seems to have the leases at /var/db/dhcpclient/leases and not under /var/db/dhcp_leases anyway.
@georhiireva - There is typo in your second command with the work minishift and cache
for my case, I had my corporation antivirus running (particularly McAfee), which was blocking the creation of
dhcpd_leases. After turning that off and shutting the firewall temporarily, it got fixed.I am still having teh same issue with BigSur … it seems noting worked form me… have any one fine a solution for that
Apparently this was caused by the McAfee Total Protection that i have installed on my macbook (Catalina v10.15.3). Disabling the Firewall function, resolved this issue.
Same issue, same configuration as @nickwilmes except Catalina. As a workaround, the virtualbox driver seems to be working (thx @fezho)
Got same issue with
minikube v1.7.3 on Darwin 10.14.6, fix this by adding argument--vm-driver=virtualboxI’m seeing the same error as @JanYunkai
Mac Os Catalina 10.15.3 ➜ ~ minikube start --memory=8192 --cpus=4 --vm-driver=hyperkit 😄 minikube v1.7.3 on Darwin 10.15.3 ✨ Using the hyperkit driver based on user configuration 🔥 Creating hyperkit VM (CPUs=4, Memory=8192MB, Disk=20000MB) …
💣 Unable to start VM. Please investigate and run ‘minikube delete’ if possible: creating host: create: 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 ba:5d:59:26:f9:29
😿 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
We’re hitting this on the Azure Pipelines macOS images, either 10.14 or 10.15.
One curiosity is that multiple times I’ve tested this, the first couple runs work fine, but then this error reproduces 100% of the time after that. That seems like it sort of meshes with @tstromberg’s theory that a lease limit is being hit… but AFAIK those hosted VMs should be completely isolated so that’s really weird. Could just be a coincidence.
Seeing same issue with a fresh install of docker for mac and minikube. It seems to be consistent (I tried uninstalling and reinstalling at least 5 times and got the same error each time). Also using mohave and do have a company VPN software installed if that is the cause (f5 Big-IP edge client).
Update: This issue is still possible, but minikube v1.4 now retries the creation process, so you are much less likely to see the problem in the wild. That said, there are still programs like “Little Snitch” that may interfere, so I am leaving this open.
Same with me too. Missing
/var/db/dhcpd_leasesfile on my mac.Details
Note:
Some digging I did (if it helps) -
touch /var/db/dhcpd_leasesdoesn’t help either. New exception after adding a dummy file isTemporary Error: could not find an IP address for 32:99:f0:57:d3:7aPlease let me know if you need any other information to fix this issue, happy to help. I can also voluntary to fix this issue once we can identify the root cause.