AlmirKadric-Published / docker-tuntap-osx

A tuntap shim installer for "Docker for Mac"
MIT License
332 stars 65 forks source link

18.09.0 build 4d60db4 - The system does not work anymore #26

Closed antwal closed 5 years ago

antwal commented 5 years ago

Hi this script not working,

the docker.hyperkit.tuntap.sh return always message Network interface arguments not found

Info for debug:

ls -l /Applications/Developer/Docker.app/Contents/Resources/bin/

-rwxr-xr-x  1 antwal  admin      1306 21 Dic 12:30 com.docker.hyperkit
-rwxr-xr-x  1 antwal  admin   4885120 29 Nov 10:11 com.docker.hyperkit.original
-rwxr-xr-x  1 antwal  admin  20480528 29 Nov 10:11 com.docker.vpnkit
-rwxr-xr-x  1 antwal  admin  46610704 29 Nov 10:11 docker
-rwxr-xr-x  1 antwal  admin   6573840 29 Nov 10:11 docker-compose
-rwxr-xr-x  1 antwal  admin   1633424 29 Nov 10:11 docker-credential-osxkeychain
-rwxr-xr-x  1 antwal  admin  34028992 29 Nov 10:11 docker-machine
-rwxr-xr-x  1 antwal  admin  54562560 29 Nov 10:11 kubectl
-rwxr-xr-x  1 antwal  admin   9579912 29 Nov 10:11 notary

ls -l /dev/tap*

crw-rw----  1 root    wheel   41,   0 21 Dic 12:28 /dev/tap0
crw-rw----  1 antwal  wheel   41,   1 21 Dic 12:28 /dev/tap1
crw-rw----  1 root    wheel   41,  10 21 Dic 12:28 /dev/tap10
crw-rw----  1 root    wheel   41,  11 21 Dic 12:28 /dev/tap11
crw-rw----  1 root    wheel   41,  12 21 Dic 12:28 /dev/tap12
crw-rw----  1 root    wheel   41,  13 21 Dic 12:28 /dev/tap13
crw-rw----  1 root    wheel   41,  14 21 Dic 12:28 /dev/tap14
crw-rw----  1 root    wheel   41,  15 21 Dic 12:28 /dev/tap15
crw-rw----  1 root    wheel   41,   2 21 Dic 12:28 /dev/tap2
crw-rw----  1 root    wheel   41,   3 21 Dic 12:28 /dev/tap3
crw-rw----  1 root    wheel   41,   4 21 Dic 12:28 /dev/tap4
crw-rw----  1 root    wheel   41,   5 21 Dic 12:28 /dev/tap5
crw-rw----  1 root    wheel   41,   6 21 Dic 12:28 /dev/tap6
crw-rw----  1 root    wheel   41,   7 21 Dic 12:28 /dev/tap7
crw-rw----  1 root    wheel   41,   8 21 Dic 12:28 /dev/tap8
crw-rw----  1 root    wheel   41,   9 21 Dic 12:28 /dev/tap9

ifconfig

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
    options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
    inet 127.0.0.1 netmask 0xff000000 
    inet6 ::1 prefixlen 128 
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
    nd6 options=201<PERFORMNUD,DAD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
    options=10b<RXCSUM,TXCSUM,VLAN_HWTAGGING,AV>
    ether 0c:4d:e9:c2:8f:b8 
    inet6 fe80::c00:4bc5:a5b:1b31%en0 prefixlen 64 secured scopeid 0x4 
    inet 172.16.88.32 netmask 0xffffff00 broadcast 172.16.88.255
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect (1000baseT <full-duplex,flow-control,energy-efficient-ethernet>)
    status: active
en1: flags=8823<UP,BROADCAST,SMART,SIMPLEX,MULTICAST> mtu 1500
    ether 88:63:df:b2:61:69 
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect (<unknown type>)
    status: inactive
en2: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
    options=60<TSO4,TSO6>
    ether 32:00:16:2a:20:00 
    media: autoselect <full-duplex>
    status: inactive
en3: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
    options=60<TSO4,TSO6>
    ether 32:00:16:2a:20:01 
    media: autoselect <full-duplex>
    status: inactive
p2p0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 2304
    ether 0a:63:df:b2:61:69 
    media: autoselect
    status: inactive
awdl0: flags=8902<BROADCAST,PROMISC,SIMPLEX,MULTICAST> mtu 1484
    ether 2e:a2:e9:8c:ef:3c 
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect
    status: inactive
bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    options=63<RXCSUM,TXCSUM,TSO4,TSO6>
    ether 32:00:16:2a:20:00 
    Configuration:
        id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
        maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
        root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
        ipfilter disabled flags 0x2
    member: en2 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 6 priority 0 path cost 0
    member: en3 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 7 priority 0 path cost 0
    nd6 options=201<PERFORMNUD,DAD>
    media: <unknown type>
    status: inactive
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000
    inet6 fe80::60c9:13be:bedb:3572%utun0 prefixlen 64 scopeid 0xb 
    nd6 options=201<PERFORMNUD,DAD>
bridge1: flags=8822<BROADCAST,SMART,SIMPLEX,MULTICAST> mtu 1500
    options=63<RXCSUM,TXCSUM,TSO4,TSO6>
    ether 0e:4d:e9:2c:40:01 
    Configuration:
        id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
        maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
        root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
        ipfilter disabled flags 0x2
    media: <unknown type>
    status: inactive
tap1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 1a:f0:5e:f1:49:e3 
    inet 10.0.75.1 netmask 0xffffff00 broadcast 10.0.75.255
    media: autoselect
    status: active
    open (pid 77850)

netstat -rn

Routing tables

Internet:
Destination        Gateway            Flags        Refs      Use   Netif Expire
default            172.16.88.1        UGSc           42        8     en0
10.0.75/24         link#12            UC              1        0    tap1
10.0.75.1          1a:f0:5e:f1:49:e3  UHLWIi          1        4     lo0
127                127.0.0.1          UCS             0        0     lo0
127.0.0.1          127.0.0.1          UH              8   983182     lo0
169.254            link#4             UCS             0        0     en0
172.16.88/24       link#4             UCS             4        0     en0
172.16.88.1/32     link#4             UCS             1        0     en0
172.16.88.1        0:c:42:b7:bb:7d    UHLWIir        43        3     en0   1178
172.16.88.32/32    link#4             UCS             0        0     en0
172.16.88.33       link#4             UHLWIi          1     2624     en0
172.16.88.38       2c:54:91:6b:c3:2f  UHLWI           0      452     en0    829
172.16.88.39       0:90:a9:e3:83:62   UHLWIi          1      209     en0   1034
172.16.88.255      ff:ff:ff:ff:ff:ff  UHLWbI          0        7     en0
224.0.0/4          link#4             UmCS            2        0     en0
224.0.0.251        1:0:5e:0:0:fb      UHmLWI          0        0     en0
239.255.255.250    1:0:5e:7f:ff:fa    UHmLWI          0     8045     en0
255.255.255.255/32 link#4             UCS             0        0     en0

Internet6:
Destination                             Gateway                         Flags         Netif Expire
default                                 fe80::%utun0                    UGcI          utun0
::1                                     ::1                             UHL             lo0
fe80::%lo0/64                           fe80::1%lo0                     UcI             lo0
fe80::1%lo0                             link#1                          UHLI            lo0
fe80::%en0/64                           link#4                          UCI             en0
fe80::c00:4bc5:a5b:1b31%en0             c:4d:e9:c2:8f:b8                UHLI            lo0
fe80::%utun0/64                         fe80::60c9:13be:bedb:3572%utun0 UcI           utun0
fe80::60c9:13be:bedb:3572%utun0         link#11                         UHLI            lo0
ff01::%lo0/32                           ::1                             UmCI            lo0
ff01::%en0/32                           link#4                          UmCI            en0
ff01::%en1/32                           link#5                          UmCI            en1
ff01::%utun0/32                         fe80::60c9:13be:bedb:3572%utun0 UmCI          utun0
ff02::%lo0/32                           ::1                             UmCI            lo0
ff02::%en0/32                           link#4                          UmCI            en0
ff02::%en1/32                           link#5                          UmCI            en1
ff02::%utun0/32                         fe80::60c9:13be:bedb:3572%utun0 UmCI          utun0

docker run --rm --privileged --pid=host --net=host alpine ifconfig

br-2b86980ef72b Link encap:Ethernet  HWaddr 02:42:2B:2C:79:C8  
          inet addr:172.20.0.1  Bcast:172.20.255.255  Mask:255.255.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

br-3b029b7aaa3f Link encap:Ethernet  HWaddr 02:42:67:92:30:30  
          inet addr:172.21.0.1  Bcast:172.21.255.255  Mask:255.255.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

docker0   Link encap:Ethernet  HWaddr 02:42:CB:C4:69:63  
          inet addr:172.17.0.1  Bcast:172.17.255.255  Mask:255.255.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth0      Link encap:Ethernet  HWaddr 02:50:00:00:00:01  
          inet addr:10.0.75.2  Bcast:10.255.255.255  Mask:255.0.0.0
          inet6 addr: fe80::50:ff:fe00:1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1700 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1064 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2360710 (2.2 MiB)  TX bytes:74439 (72.6 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:1092 (1.0 KiB)  TX bytes:1092 (1.0 KiB)

docker run --rm --privileged --pid=host debian nsenter -t 1 -m -u -n -i iptables-save

Unable to find image 'debian:latest' locally
latest: Pulling from library/debian
Digest: sha256:df6ebd5e9c87d0d7381360209f3a05c62981b5c2a3ec94228da4082ba07c4f05
Status: Downloaded newer image for debian:latest
nsenter: failed to execute iptables-save: No such file or directory

docker inspect <>

[
    {
        "Id": "ef7906edd573fa009b56226991db7a620cf513c2cea9aefa7645ba2e863fabaf",
        "Created": "2018-12-21T12:07:42.368132093Z",
        "Path": "nginx",
        "Args": [
            "-g",
            "daemon off;"
        ],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 3715,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2018-12-21T12:07:42.620622036Z",
            "FinishedAt": "0001-01-01T00:00:00Z"
        },
        "Image": "sha256:63356c558c795f9f4ec4d4197f341ebc31a2f708bacbdc53076a149108ce477b",
        "ResolvConfPath": "/var/lib/docker/containers/ef7906edd573fa009b56226991db7a620cf513c2cea9aefa7645ba2e863fabaf/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/ef7906edd573fa009b56226991db7a620cf513c2cea9aefa7645ba2e863fabaf/hostname",
        "HostsPath": "/var/lib/docker/containers/ef7906edd573fa009b56226991db7a620cf513c2cea9aefa7645ba2e863fabaf/hosts",
        "LogPath": "/var/lib/docker/containers/ef7906edd573fa009b56226991db7a620cf513c2cea9aefa7645ba2e863fabaf/ef7906edd573fa009b56226991db7a620cf513c2cea9aefa7645ba2e863fabaf-json.log",
        "Name": "/stoic_morse",
        "RestartCount": 0,
        "Driver": "overlay2",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": null,
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "host",
            "PortBindings": {},
            "RestartPolicy": {
                "Name": "no",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "CapAdd": null,
            "CapDrop": null,
            "Dns": [],
            "DnsOptions": [],
            "DnsSearch": [],
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "shareable",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "host",
            "Privileged": true,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": [
                "label=disable"
            ],
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "ConsoleSize": [
                0,
                0
            ],
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": [],
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": [],
            "DeviceCgroupRules": null,
            "DiskQuota": 0,
            "KernelMemory": 0,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": false,
            "PidsLimit": 0,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": null,
            "ReadonlyPaths": null
        },
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/496109bc3d3aee0ac602ebcc71bb695b69d01f3148c4342006ffaa73cf76fe70-init/diff:/var/lib/docker/overlay2/407b9b6388a9ef2015fcc6c338ccf45b932acc6fd717b2052faebc0ca9127f13/diff:/var/lib/docker/overlay2/f04e9a3d4a74c5151a6a3348e6f602d3ec3e510ab24a7201e4e0315f2c6bb930/diff:/var/lib/docker/overlay2/9d5a937ae185fb7e1c974c026bd2085f6b99ddfc432d4086082a15b7314302c4/diff:/var/lib/docker/overlay2/0a5fe5083aba00da82fd1aa2eafc4689c8f29b97e3fe96a4477a2d49724cf7af/diff",
                "MergedDir": "/var/lib/docker/overlay2/496109bc3d3aee0ac602ebcc71bb695b69d01f3148c4342006ffaa73cf76fe70/merged",
                "UpperDir": "/var/lib/docker/overlay2/496109bc3d3aee0ac602ebcc71bb695b69d01f3148c4342006ffaa73cf76fe70/diff",
                "WorkDir": "/var/lib/docker/overlay2/496109bc3d3aee0ac602ebcc71bb695b69d01f3148c4342006ffaa73cf76fe70/work"
            },
            "Name": "overlay2"
        },
        "Mounts": [],
        "Config": {
            "Hostname": "linuxkit-025000000001",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "80/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "NGINX_VERSION=1.15.7"
            ],
            "Cmd": [
                "nginx",
                "-g",
                "daemon off;"
            ],
            "ArgsEscaped": true,
            "Image": "nginx:alpine",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": {
                "maintainer": "NGINX Docker Maintainers <docker-maint@nginx.com>"
            },
            "StopSignal": "SIGTERM"
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "8890058d65a336a854cc7d4706cd2d223dcb3b9622ff55409dbf805bb2b69c17",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {},
            "SandboxKey": "/var/run/docker/netns/default",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "host": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "87157e5ce097e54abbf39c6aa34999fd2c4e8c961a8c61915786f2f1f681f0a5",
                    "EndpointID": "e6f762194bb65eba2d88993e25dc56e64c984afeaf66fd1ed9718ee667354817",
                    "Gateway": "",
                    "IPAddress": "",
                    "IPPrefixLen": 0,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "",
                    "DriverOpts": null
                }
            }
        }
    }
]
normtown commented 5 years ago

I'm also seeing this. Running engine 18.09.2. Any idea what's going on?

AlmirKadric commented 5 years ago

Thanks for brining this up, will take a look

normtown commented 5 years ago

Thanks. What can I do to help the investigation?

AlmirKadric commented 5 years ago

Hmmm unusual, I just ran the script against a fresh install of Docker

And it all ran fine

$ ./sbin/docker_tap_install.sh
Password:
Installation complete
Restarting Docker
Process restarting, ready to go

According to your error message the arguments passed to the shim script doesn't contain any arguments relating to the networking options within hyperkit. That error message you said you're getting from you executing the script directly? Or from the internal docker execution?

Can you run ps axj | grep hyperkit and put the output here?

normtown commented 5 years ago

I just realized that I'm seeing a slightly different problem. The install script runs fine, but if I setup a route to my container through 10.0.75.2, run a netcat listener in my container, and try to connect from an OSX shell, it cannot connect. I have also tried running the netcat listener from a shell in the xhyve VM, and tried to connect to it directly on 10.0.75.2, and it is still unreachable. I can open a separate issue for this.

AlmirKadric commented 5 years ago

@normtown please open another ticket with an exact description of your issue I will close this issue as I believe this issue was fixed in a previous fix. If anyone is still having this issue, please open a new ticket and I'll take a look