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)

Most upvoted comments

@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=hyperkit to 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):

  1. minishift stop
  2. minishift delete --clear-cache
  3. rm -fr ~/.minishift
  4. brew reinstall hyperkit
  5. brew reinstall docker-machine-driver-hyperkit
  6. sudo chown root:wheel /usr/local/bin/docker-machine-driver-hyperkit && sudo chmod u+s /usr/local/bin/docker-machine-driver-hyperkit
  7. sudo chown root:wheel /usr/local/bin/hyperkit && sudo chmod u+s /usr/local/bin/hyperkit
  8. minishift config set vm-driver hyperkit (u’ll have message: instance doesn’t exist bla bla, will be set on next start - it’s ok)
  9. minishift start Minishift start successfully. PS: Check the location of docker-machine-driver-hyperkit and hyperkit before points 6 and 7. I hope this will help somebody.

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

foo@bar$ brew reinstall hyperkit
foo@bar$ brew link hyperkit
foo@bar$ sudo chown root:wheel /usr/local/Cellar/hyperkit/0.20200908/bin/hyperkit
foo@bar$ sudo chmod u+s /usr/local/Cellar/hyperkit/0.20200908/bin/hyperkit
foo@bar$ brew reinstall docker-machine-driver-hyperkit
foo@bar$ sudo chown root:wheel /usr/local/opt/docker-machine-driver-hyperkit/bin/docker-machine-driver-hyperkit
foo@bar$ sudo chmod u+s /usr/local/opt/docker-machine-driver-hyperkit/bin/docker-machine-driver-hyperkit
foo@bar$ sudo rm /var/db/dhcpd_leases
foo@bar$ sudo touch /var/db/dhcpd_leases
foo@bar$ minishift stop
foo@bar$ minishift delete --force --clear-cache
foo@bar$ rm -rf ~/.minishift
foo@bar$ brew install --cask --force minishift

Go to System Preferences > Security & Privacy > Firewall > [Firewall Options] > [ ] Enable stealth mode

And disable stealth mode if enabled.

foo@bar$ minishift start --show-libmachine-logs -v5 --network-nameserver 8.8.8.8

I dont know for sure, but I suspect the fix was brew install --cask --force minishift

Running MacOS Big Sur 11.6.2 in a corporate environment which has the pf firewall configured, have been experiencing this issue.

I created a new pf rules file /etc/pf.anchors/io.k8s.sigs.minikube and whittled it down to the following rule:

# log is optional and uses `pflog0` by default;  `man pflog` gives instructions to see the logged packets
pass log on bridge100 inet proto udp from any port bootpc to port bootps

Unsure whether the bridge100 device 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:

anchor "minikube"
load anchor "minikube" from "/etc/pf.anchors/io.k8s.sigs.minikube"

To reload pf using the updated rules:

# pfctl -d
# pfctl -e -f /etc/pf.conf

Cleared everything down with minikube delete then restarted minikube start, the following appears in the pflog0 tcpdump:

 00:00:04.420007 rule 2.minikube.0/0(match): pass in on bridge100: 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from ca:7e:32:41:3f:16, length 278

The minikube starts successfully.

@tstromberg I encountered the same problem on macOS Catalina 10.15.4 :

Temporary Error: open /var/db/dhcpd_leases: no such file or directory

On my machine, I had installed the following from homebrew:

  • brew install docker
  • brew install docker-machine
  • brew install docker-machine-driver-hyperkit
  • brew install hyperkit

to work around the problem, I uninstalled everything:

  • brew uninstall docker
  • brew uninstall docker-machine
  • brew uninstall docker-machine-driver-hyperkit
  • brew uninstall hyperkit

Then I Installed Docker Desktop for Mac from here: https://hub.docker.com/editions/community/docker-ce-desktop-mac/

After doing that, I had:

docker version
Client: Docker Engine - Community
 Version:           19.03.8
 API version:       1.40
 Go version:        go1.12.17
 Git commit:        afacb8b
 Built:             Wed Mar 11 01:21:11 2020
 OS/Arch:           darwin/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.8
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.17
  Git commit:       afacb8b
  Built:            Wed Mar 11 01:29:16 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

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

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:

sudo launchctl enable system/com.apple.bootpd

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

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

@colangelo thank you for the suggestion! it turned out it to be Little Snitch that was causing preventing minikube-darwin-amd64 from creating/writing to /var/db/dhcpd_leases

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

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

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=virtualbox

I’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_leases file on my mac.

Details

  • OS: High Sierra [10.13.6]
  • Same Exception Trace
  • HyperKit - latest
➜  ~ hyperkit -v
hyperkit: v0.20190201-11-gc0dd46

Homepage: https://github.com/docker/hyperkit
License: BSD
  • Hyperkit driver - latest
➜  ~ docker-machine-driver-hyperkit version
version: v1.3.0
commit: 43969594266d77b555a207b0f3e9b3fa1dc92b1f
  • Minikube - latest
➜  ~ minikube version
minikube version: v1.3.0
commit: 43969594266d77b555a207b0f3e9b3fa1dc92b1f

Note:

  • I can start Minikube using Virtualbox.
  • I do have Cisco AnyConnect software installed for connecting to VPN but I am not using it when starting Minikube.
  • Laptop is company managed as in few policies are in place like Siri being unavailable.

Some digging I did (if it helps) -

  • Function GetIPAddressByMACAddress() tries to get a IP Address for the assigned MAC address by reading it from file. File’s path is hardcoded in LeasesPath.
  • Creating a dummy touch /var/db/dhcpd_leases doesn’t help either. New exception after adding a dummy file is Temporary Error: could not find an IP address for 32:99:f0:57:d3:7a
  • Not able to start a dhcp server on mac (using bootp) either [This is most probably my fault for not doing it right]

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