Open colangelo opened 5 years ago
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.
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.
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):
@georhiireva - There is typo in your second command with the work minishift and cache
@georhiireva - There is typo in your second command with the work minishift and cache
@cr-tech-repo , thanks, fix it
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 restartedminikube 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.
@edrandall I get a syntax error while enabling the firewall. Any idea which part might be causing it?
/etc/pf.conf:36: syntax error
pfctl: Syntax error in config file: pf rules not loaded
pfctl: load anchors
/etc/pf.conf
:
scrub-anchor "cisco.anyconnect.vpn"
scrub-anchor "com.apple/*"
nat-anchor "com.apple/*"
rdr-anchor "com.apple/*"
dummynet-anchor "com.apple/*"
anchor "cisco.anyconnect.vpn"
load anchor "cisco.anyconnect.vpn" from "/opt/cisco/anyconnect/ac_pf.conf"
anchor "com.apple/*"
load anchor "com.apple" from "/etc/pf.anchors/com.apple"
# com.crowdstrike anchor point
anchor "com.crowdstrike"
load anchor "com.crowdstrike" from "/etc/pf.anchors/com.crowdstrike"
anchor "minikube"
load anchor "minikube" from "/etc/pf.anchors/io.k8s.sigs.minikube"
/etc/pf.anchors/io.k8s.sigs.minikube
:
# 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
I am on MacOS Catalina 10.15.7.
probably a mismatched quote somewhere, could be in pf.conf or any of your anchor files.
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/dhcpleases anyway.
Facing this issue too on BigSur Mac - tried all tricks about to no avail
Try the following packet filter rules:
#
# Allows minikube to run using hyperkit
# /etc/pf.anchors/io.k8s.sigs.minikube - load by adding 2 lines to /etc/pf.conf:
# ---
# anchor "io.k8s.sigs.minikube"
# load anchor "io.k8s.sigs.minikube" from "/etc/pf.anchors/io.k8s.sigs.minikube"
# ---
# Restart: pfctl -d ; pfctl -e -f /etc/pf.conf
# To watch logged packets, add "log" directive to rule(s) and run:
# ifconfig pflog0 create
# tcpdump -n -e -ttt -i pflog0
#
# Allow hyperkit DHCP packet in
pass on bridge100 inet proto udp from any port bootpc to port bootps
# Allow hyperkit to pull images
pass inet proto udp from 192.168.0.0/16 to any port 53
pass inet proto tcp from 192.168.0.0/16 to any
This is biting me as well. I followed up most of suggestions including the /etc/pf.anchors. I cannot turn off the firewall as my company Mac is under control of Falcon.
Mac is Intel, Monterey 12.4. As of 2022-07-18, as far as I can tell, minikube - 1.26.0 hyperkit - 0.20200908 docker-machine-driver-hyperkit - 1.0.0
minikube_logs_1b004fc441daa6a7016058454b974cf8421ba12a_0.log
I'm on Mac Monterrey and saw the note about the dhcp_leases file not being there (true) but /var/db/dhcpclient containing IP information. I'm in a crunch to get through this K8s tutorial, so I thought I'd try something down and dirty and copy one of the files from the dhcpclient to /var/db/dhcpd_leases and see if that worked -- but it couldn't parse XML, so I'm stuck again. I'll clean up my hack and pull the logs - but the issue remains that there is no such file as dhcpd_leases
๐ฟ Failed to start hyperkit VM. Running "minikube delete" may fix it: creating host: create: Error creating machine: Error in driver during machine creation: IP address never found in dhcp leases file Temporary error: unable to parse line: <?xml version="1.0" encoding="UTF-8"? minikube_logs_d5f6b3eb7402185b5cbe7c8e6ab1ab332f57ca4f_0.log logs.txt
It fixed for me after I uninstalled Falcon Sensor. (macOS-2.6.1)
I'm going to investigate starting hyperkit
on a MacBook Pro with an Intel (x86
) processor; I'll report what I find.
/assign
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:
The full output of the command that failed:
The output of the
minikube logs
command: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_X8664 x86