Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing interface in Windows containers (Swarm mode) #2754

Closed
2 tasks done
ghost opened this issue Oct 16, 2018 · 13 comments
Closed
2 tasks done

Missing interface in Windows containers (Swarm mode) #2754

ghost opened this issue Oct 16, 2018 · 13 comments

Comments

@ghost
Copy link

ghost commented Oct 16, 2018

  • I have tried with the latest version of my channel (Stable or Edge)
  • I have uploaded Diagnostics
    Diagnostics ID: F38938EB-2D02-4679-88C2-3E30F5E56D09/20181018174455

Steps:

  • Create a swarm with 2 nodes, one linux and one windows, both running the latest version of ce and ee for the Windows node
  • Deploy the following stack file:
version: "3.2"
services:

  iis:
    image: microsoft/iis
    networks:
      - demo
    deploy:
      placement:
        constraints: [node.platform.OS == windows]

  nginx:
    image: nginx
    networks:
      - demo
    deploy:
      endpoint_mode: dnsrr
      placement:
        constraints: [node.platform.OS == linux]

networks:
  demo:
    driver: overlay

Then, docker exec -ti CONTAINER_NAME powershell/sh

Windows side:

C:\>ipconfig /all
 
Windows IP Configuration
 
   Host Name . . . . . . . . . . . . : 2a2ed1e89ec8
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
 
Ethernet adapter vEthernet (352529a90870408d116ce0f436bf5a90e468f7b10de3bd175abb61ea49c20c5b):
 
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #4
   Physical Address. . . . . . . . . : 00-15-5D-3F-72-07
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::1dbb:9551:d7fa:c0cb%35(Preferred)
   IPv4 Address. . . . . . . . . . . : 10.255.0.18(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.0.0
   Default Gateway . . . . . . . . . : 10.255.0.1
   DNS Servers . . . . . . . . . . . : 10.255.0.1
   NetBIOS over Tcpip. . . . . . . . : Disabled
 
Ethernet adapter vEthernet (bb536d8b67a3ee9225a4353e3bee2557c79b887158b4152a44c67d6202247d13):
 
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #5
   Physical Address. . . . . . . . . : 00-15-5D-95-CF-A1
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::c091:c7c4:5984:8066%40(Preferred)
   IPv4 Address. . . . . . . . . . . : 10.0.4.7(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 10.0.4.1
   DNS Servers . . . . . . . . . . . : 10.0.4.1
   NetBIOS over Tcpip. . . . . . . . : Disabled

Linux side:

/ # ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
167: eth0@if168: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1450 qdisc noqueue state UP
    link/ether 02:42:0a:ff:00:10 brd ff:ff:ff:ff:ff:ff
    inet 10.255.0.16/16 brd 10.255.255.255 scope global eth0
       valid_lft forever preferred_lft forever
169: eth2@if170: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP
    link/ether 02:42:ac:12:00:03 brd ff:ff:ff:ff:ff:ff
    inet 172.18.0.3/16 brd 172.18.255.255 scope global eth2
       valid_lft forever preferred_lft forever
171: eth1@if172: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1450 qdisc noqueue state UP
    link/ether 02:42:0a:00:04:05 brd ff:ff:ff:ff:ff:ff
    inet 10.0.4.5/24 brd 10.0.4.255 scope global eth1
       valid_lft forever preferred_lft forever

Expected behavior

The Windows and Linux side should both have 3 interfaces

Actual behavior

The Windows side only has 2 and is missing the nat(?) interface

Edited to reflect the actual problem

@ghost
Copy link
Author

ghost commented Oct 18, 2018

I dug a bit deeper and found out that an interface is missing in the Windows containers.
I also added a diagnosis ID.
@ebriney would you mind having a look?

Windows conainer

PS C:\> ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : 6fde9b76b763
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Ethernet:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter
   Physical Address. . . . . . . . . : 00-15-5D-1F-7D-FC
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::58cf:b559:a9dc:b6dd%4(Preferred)
   IPv4 Address. . . . . . . . . . . : 10.0.2.4(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 10.0.2.1
   DHCPv6 IAID . . . . . . . . . . . : 67114333
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-23-5A-D6-99-00-15-5D-1F-7D-FC
   DNS Servers . . . . . . . . . . . : 10.0.2.1
   NetBIOS over Tcpip. . . . . . . . : Disabled
PS C:\>

Linux container

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1450
        inet 10.0.2.5  netmask 255.255.255.0  broadcast 10.0.2.255
        ether 02:42:0a:00:02:05  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.18.0.3  netmask 255.255.0.0  broadcast 172.18.255.255
        ether 02:42:ac:12:00:03  txqueuelen 0  (Ethernet)
        RX packets 7021  bytes 9010266 (8.5 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2644  bytes 178520 (174.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1  (Local Loopback)
        RX packets 16  bytes 1576 (1.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 16  bytes 1576 (1.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

@ghost
Copy link
Author

ghost commented Oct 23, 2018

I also found this that seems related https://success.docker.com/article/windows-overlay-ping-failure

@ghost
Copy link
Author

ghost commented Oct 24, 2018

When deploying on an actual Windows 1803 server following https://docs.microsoft.com/en-us/virtualization/windowscontainers/quick-start/quick-start-windows-server, there is the missing interface and I am able to reach the outside world. nslookup to other containers still does not work.

@ghost ghost changed the title Network issues in Windows containers (Swarm mode) Missing interface in Windows containers (Swarm mode) Oct 24, 2018
@bushelofsilicon
Copy link

I seem to also be experiencing this issue. DNS lookup is not working on my overlay network.

@ghost
Copy link
Author

ghost commented Oct 26, 2018

@bushelofsilicon On my side it is now working but only with the "real" 1803 server that runs 17.06.2-ee-16.
Ping does not work and nslookup does not work but when you do a ping, the server knows the IP so whatever replaces the DNS system works:

PS C:\> ping iis

Pinging iis [10.0.0.6] with 32 bytes of data:
Control-C

In the end, it does not work on Docker for Windows because it is missing a network interface so this is issue is still to be addressed

@bushelofsilicon
Copy link

The Docker hosts are on VMWare. 1803 running 18.03.1-ee-3. The swarm managers are Linux, 18.03.1-ce.

PS C:\> ping iis
Ping request could not find host iis. Please check the name and try again.

@ghost
Copy link
Author

ghost commented Nov 29, 2018

Thanks! unfortunately for us it did not fix but now we got all problems solved by running 18.06.1-ce on both Linux (Ubuntu/Debian) and Windows (server 1803) on physical servers. For Windows, you have to compile 18.06.1-ce yourself.

@docker-robott
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle stale

@ghost
Copy link
Author

ghost commented Feb 27, 2019 via email

@Rakiah
Copy link

Rakiah commented Jan 4, 2020

Problem still remains with 19.03.5 with docker for windows, this is a huge problem IMO because there's not way to have windows docker containers access the local network where other systems could reside

@ghost
Copy link
Author

ghost commented Jan 7, 2020

TBH, they don't seem to care. They made it work in https://www.docker.com/products/docker-enterprise via proprietary code and they have no interest into fixing that.

There is a solution but it seems to work only on Windows servers semi-annual. ie 1803, etc... and when you compile it yourself for Windows. Basically, you cannot use their default installer.

@ghost
Copy link
Author

ghost commented Jan 7, 2020

@Rakiah Check your email on the address you have on your profile.

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jul 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants