interface tap1 does not exist
Opened this issue · 18 comments
Every time restart mac
mac:sbin jannal$ sudo ./docker_tap_up.sh
ifconfig: interface tap1 does not exist
@jannal you mean after you run the install script, every time you restart your mac and docker starts up, the interfaces aren't created? What is the process you followed from the beginning?
@AlmirKadric right
docker version: 18.06.1-ce-mac73 (26764)
mac: MacOS Sierra 10.12.6 MacBook Pro (Retina, 15-inch, Mid 2014)
first install
$ brew tap caskroom/cask
$ brew cask install tuntap
$ ./sbin/docker_tap_install.sh
$ ./sbin/docker_tap_up.sh
$ sudo launchctl list |grep tap
- 0 net.sf.tuntaposx.tun
- 0 net.sf.tuntaposx.tap
- 0 com.fortinet.fctappfw
restart mac
start docker
$ sudo ./docker_tap_up.sh
ifconfig: interface tap1 does not exist
$ ls -l /dev/tap*
crw-rw---- 1 root wheel 22, 0 10 12 17:33 /dev/tap0
crw-rw---- 1 jannal wheel 22, 1 10 20 12:40 /dev/tap1
crw-rw---- 1 root wheel 22, 10 10 12 17:33 /dev/tap10
crw-rw---- 1 root wheel 22, 11 10 12 17:33 /dev/tap11
crw-rw---- 1 root wheel 22, 12 10 12 17:33 /dev/tap12
crw-rw---- 1 root wheel 22, 13 10 12 17:33 /dev/tap13
crw-rw---- 1 root wheel 22, 14 10 12 17:33 /dev/tap14
crw-rw---- 1 root wheel 22, 15 10 12 17:33 /dev/tap15
crw-rw---- 1 root wheel 22, 2 10 12 17:33 /dev/tap2
crw-rw---- 1 root wheel 22, 3 10 12 17:33 /dev/tap3
crw-rw---- 1 root wheel 22, 4 10 12 17:33 /dev/tap4
crw-rw---- 1 root wheel 22, 5 10 12 17:33 /dev/tap5
crw-rw---- 1 root wheel 22, 6 10 12 17:33 /dev/tap6
crw-rw---- 1 root wheel 22, 7 10 12 17:33 /dev/tap7
crw-rw---- 1 root wheel 22, 8 10 12 17:33 /dev/tap8
crw-rw---- 1 root wheel 22, 9 10 12 17:33 /dev/tap9
$ sudo /sbin/kextload /Library/Extensions/tap.kext
$ sudo /sbin/kextload /Library/Extensions/tun.kext
$ sudo ./docker_tap_up.sh
ifconfig: interface tap1 does not exist
I can only re-execute the install
@jannal
I see, the reason for that error is because docker hasn't bound itself to that tap interface
Can you give me the output of the docker hyper command after a restart ps -axf | grep hyper
Also instead of re-running the install script, try restarting docker to see if it attaches itself to the tap interface
mac:~ jannal$ ps -axf | grep hyper
501 646 635 0 9:15下午 ?? 0:41.55 /Applications/Docker.app/Contents/Resources/bin/com.docker.hyperkit.original -A -u -F vms/0/hyperkit.pid -c 4 -m 4096M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-vpnkit,path=vpnkit.eth.sock,uuid=9c42dae8-af56-4e9f-88fa-cc2536b3b172 -U fd63f0d1-3986-481b-9644-600050528e65 -s 2:0,ahci-hd,file:///Volumes/O/docker/imagesLocation/Docker.qcow2?sync=os&buffered=1,format=qcow,qcow-config=discard=true;compact_after_unmaps=262144;keep_erased=262144;runtime_asserts=false -s 2:1,virtio-tap,tap1 -s 3,virtio-sock,guest_cid=3,path=vms/0,guest_forwards=2376;1525 -s 4,ahci-cd,/Applications/Docker.app/Contents/Resources/linuxkit/docker-for-mac.iso -s 5,ahci-cd,vms/0/config.iso -s 6,virtio-rnd -s 7,virtio-9p,path=vpnkit.port.sock,tag=port -l com1,autopty=vms/0/tty,asl -f bootrom,/Applications/Docker.app/Contents/Resources/uefi/UEFI.fd,,
501 899 824 0 9:17下午 ttys001 0:00.00 grep hyper
Had the same issue, closed Docker, re-run install and up scripts and it's running again.
I have the same issue
I have same issue
@jannal are you still getting the issue on the latest version?
please try pulling down the latest code, and re-installing the shim
you can do this with ./sbin/docker_tap_install.sh -f
please let me know if anyone is still having the same issues
@AlmirKadric Thank you, I will try
Are they some suggestions, how to fix this? Of course running ./sbin/docker_tap_install.sh -f
resolves the problem, but why the tap1 device is not enabled after a reboot?
Comparing the parameters after reboot and then after execution docker_tap_install, the command of starting hyperkit is exactly the same:
/Applications/Docker.app/Contents/Resources/bin/com.docker.hyperkit.original -A -u -F vms/0/hyperkit.pid -c 4 -m 2048M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-vpnkit,path=vpnkit.eth.sock,uuid=9253c68a-912d-4c40-8281-dbf7dc6b1b99 -U f027a0c4-0502-4616-9f9d-65b11da9aa1a -s 2:0,ahci-hd,/Users/jwn/Library/Containers/com.docker.docker/Data/vms/0/Docker.raw -s 2:1,virtio-tap,tap1 -s 3,virtio-sock,guest_cid=3,path=vms/0,guest_forwards=2376;1525 -s 4,ahci-cd,/Applications/Docker.app/Contents/Resources/linuxkit/docker-desktop.iso -s 5,ahci-cd,vms/0/config.iso -s 6,ahci-cd,/Applications/Docker.app/Contents/Resources/linuxkit/docker.iso -s 7,virtio-rnd -l com1,autopty=vms/0/tty,asl -f bootrom,/Applications/Docker.app/Contents/Resources/uefi/UEFI.fd,,
@jwundrak, in theory, you shouldn't need to run the install script after a reboot. Once the shim is installed, all you should need to do is bring the tap interfaces up with ./sbin/docker_tap_up.sh
However, sometimes docker will start up before the tap interfaces are ready at a system level. This is why the -f option is needed since it forces a restart of docker and at this point, the tap interfaces are guaranteed to be available at a system level.
I guess I could add a waiting check within the shim which waits for the tap interfaces to be available. will take a look and see what can be done.
Do you mind opening another issue for this?
@AlmirKadric Sorry for the late response.
I think, this is the exactly the issue of the OP @jannal . I saw currently no option for the delay, but if you find something, it would be so great.
Else I need to write a script, that is restart docker, after the first start, which is really ugly.
You never got this behaviour or run you we -f
-flag after a reboot (like me) :)
@AlmirKadric Problem still exists
Same here
same here
Same here with Docker Version: 19.03.8
Make sure that user running docker.hyperkit owns /dev/tap1
For me running docker_tap_install.sh
with correct user did the trick.
Something like this:
sudo -u $(ps aux |grep '[d]ocker.hyperkit' |cut -d' ' -f1) ./docker_tap_install.sh -f