moby / moby/swarmkit

Windows container unable to ping Ubuntu Container

Open
#2,160 8 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
3.7k
Forks
676
Avg merge
4d 9h
Merged PRs (30d)
6

Description

We are trying to create a docker swarm that has a ASP.NET Docker service running on a Windows docker container that is served via an Nginx service running on an Ubuntu docker-machine. The problem is the Windows container is not properly responding to other services in the swarm. We have Django apps using the same Nginx service which are running great but the ASP.NET app is timing out.
We went into the Nginx container and successfully touched the ASP.NET container but when we went into the ASP.NET container requests were being sent to the correct IP but all requests time out.
Here is everything we know to this point:

Docker version 17.04.0-ce, build 4845c56
Running Windows Server 2016 - KB3150513
Disabled firewall to confirm it isn't an issue with ports
Windows container running on docker instance directly on the Windows Server
Ubuntu containers are on Ubuntu Docker machines
Ubuntu services can ping Windows services but Windows services unable to reach Ubuntu Services
Ubuntu-> Windows
Windows ->X Ubuntu

Our Stack:

ID                  NAME                    IMAGE                          NODE                DESIRED STATE       CURRENT STATE                    ERROR                       PORTS
jhqjiqg9dhsw        ourStack_DjangoProd.1   ourRepo/Django-prod:rc         ourStack-worker-5   Running             Running 38 seconds ago
qixjelib9bzj        ourStack_nginx.1        ourRepo/stealth-nginx:latest   ourStack-worker-5   Running             Running 34 seconds ago
k8u0p6mzwz54        ourStack_DjangoStage.1  ourRepo/Django-staging:latest  ourStack-worker-5   Running             Running 39 seconds ago
v1tzi1z7hxei        ourStack_DjangoDev.1    ourRepo/Django-staging:latest  manager-3           Running             Running 39 seconds ago
uxlvdlp6qwuu        ourStack_asp-app.1      ourRepo/asp-app:latest         CAMSTAT-SVR         Running             Running less than a second ago
omvwb4cjdrzd        ourStack_nginx.2        ourRepo/stealth-nginx:latest   manager-3           Running             Running 33 seconds ago
kc8tp6dpf6i1        ourStack_DjangoProd.2   ourRepo/Django-prod:rc         manager-3           Running             Running 37 seconds ago

Nginx ifconfig:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1450
        inet 10.255.0.13  netmask 255.255.0.0  broadcast 0.0.0.0
        ether 02:42:0a:ff:00:0d  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.5  netmask 255.255.0.0  broadcast 0.0.0.0
        ether 02:42:ac:12:00:05  txqueuelen 0  (Ethernet)
        RX packets 229  bytes 263967 (257.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 107  bytes 7219 (7.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1450
        inet 10.0.0.6  netmask 255.255.255.0  broadcast 0.0.0.0
        ether 02:42:0a:00:00:06  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

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 12  bytes 1456 (1.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 12  bytes 1456 (1.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Nginx ping ASP:

root@f4dde99e6401:/var/www# ping ourStack_asp-app
PING ourStack_asp-app (10.0.0.2): 56 data bytes
64 bytes from 10.0.0.2: icmp_seq=0 ttl=64 time=0.401 ms
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.095 ms
64 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=0.090 ms
64 bytes from 10.0.0.2: icmp_seq=3 ttl=64 time=0.105 ms
64 bytes from 10.0.0.2: icmp_seq=4 ttl=64 time=0.104 ms
64 bytes from 10.0.0.2: icmp_seq=5 ttl=64 time=0.097 ms
64 bytes from 10.0.0.2: icmp_seq=6 ttl=64 time=0.092 ms
64 bytes from 10.0.0.2: icmp_seq=7 ttl=64 time=0.094 ms
64 bytes from 10.0.0.2: icmp_seq=8 ttl=64 time=0.099 ms
64 bytes from 10.0.0.2: icmp_seq=9 ttl=64 time=0.095 ms
--- ourStack_asp-app ping statistics ---
10 packets tranDjangotted, 10 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.090/0.127/0.401/0.091 ms

Nginx service inspect:

[
    {
        "ID": "ualbse6gr74jehk66ec9ftekk",
        "Version": {
            "Index": 5388
        },
        "CreatedAt": "2017-05-02T13:24:12.436333625Z",
        "UpdatedAt": "2017-05-02T13:24:12.442605083Z",
        "Spec": {
            "Name": "ourStack_nginx",
            "Labels": {
                "com.docker.stack.namespace": "python"
            },
            "TaskTemplate": {
                "ContainerSpec": {
                    "Image": "8675309/stealth-nginx:latest@sha256:ce9c2faab917ad2fe626843e96846eacb98dc8feb5fcd930ebe1d4da77bf0681",
                    "Labels": {
                        "com.docker.stack.namespace": "python"
                    }
                },
                "Resources": {},
                "RestartPolicy": {
                    "Condition": "on-failure",
                    "MaxAttempts": 0
                },
                "Placement": {
                    "Constraints": [
                        "node.platform.os == linux"
                    ]
                },
                "ForceUpdate": 0
            },
            "Mode": {
                "Replicated": {
                    "Replicas": 2
                }
            },
            "UpdateConfig": {
                "Parallelism": 2,
                "Delay": 10000000000,
                "FailureAction": "pause",
                "MaxFailureRatio": 0
            },
            "Networks": [
                {
                    "Target": "8mcvr2tcfgeacn16gulkkzkpb",
                    "Aliases": [
                        "nginx"
                    ]
                }
            ],
            "EndpointSpec": {
                "Mode": "vip",
                "Ports": [
                    {
                        "Protocol": "tcp",
                        "TargetPort": 80,
                        "PublishedPort": 80,
                        "PublishMode": "ingress"
                    }
                ]
            }
        },
        "Endpoint": {
            "Spec": {
                "Mode": "vip",
                "Ports": [
                    {
                        "Protocol": "tcp",
                        "TargetPort": 80,
                        "PublishedPort": 80,
                        "PublishMode": "ingress"
                    }
                ]
            },
            "Ports": [
                {
                    "Protocol": "tcp",
                    "TargetPort": 80,
                    "PublishedPort": 80,
                    "PublishMode": "ingress"
                }
            ],
            "VirtualIPs": [
                {
                    "NetworkID": "fbopakq2nzt436rq1b2zv5ol7",
                    "Addr": "10.255.0.10/16"
                },
                {
                    "NetworkID": "8mcvr2tcfgeacn16gulkkzkpb",
                    "Addr": "10.0.0.4/24"
                }
            ]
        }
    }
]

ASP Service:

CONTAINER ID        IMAGE                                                                                        COMMAND                   CREATED             STATUS              PORTS               NAMES
e986dfb90c79        ourRepo/asp-app@sha256:1580d526c06482d7ef92c1fdec4beb494ff340feb6f9ec7125fdf67ffa7eefab   "C:\\ServiceMonitor..."   6 minutes ago       Up 6 minutes        80/tcp, 6000/tcp    ourStack_asp-app.1.uxlvdlp6qwuu837kutibvhnac
'''

**ASP ipconfig:**
'''
Windows IP Configuration

Ethernet adapter vEthernet (Container NIC 67208761):

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::f9c8:5b32:1e75:d7bb%64
   IPv4 Address. . . . . . . . . . . : 10.255.0.6
   Subnet Mask . . . . . . . . . . . : 255.255.0.0
   Default Gateway . . . . . . . . . :

Ethernet adapter vEthernet (Container NIC 6546affc):

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::d53e:9d30:758a:29ee%69
   IPv4 Address. . . . . . . . . . . : 10.0.0.3
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

Ethernet adapter vEthernet (Container NIC 5e1156e0):

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::d000:c63d:ff:b91a%74
   IPv4 Address. . . . . . . . . . . : 172.17.227.52  		-- Can access .NET app from here at port 6000
   Subnet Mask . . . . . . . . . . . : 255.255.240.0
   Default Gateway . . . . . . . . . : 172.17.224.1

ASP ping:

ping ourStack_nginx

Pinging ourStack_nginx [10.0.0.4] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 10.0.0.4:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

ASP service inspect:

[
    {
        "ID": "kojjy62r48slhipzvyti56ewb",
        "Version": {
            "Index": 5381
        },
        "CreatedAt": "2017-05-02T13:24:11.78049809Z",
        "UpdatedAt": "2017-05-02T13:24:11.782822174Z",
        "Spec": {
            "Name": "ourStack_asp-app",
            "Labels": {
                "com.docker.stack.namespace": "ourStack"
            },
            "TaskTemplate": {
                "ContainerSpec": {
                    "Image": "ourRepo/asp-app:latest@sha256:1580d526c06482d7ef92c1fdec4beb494ff340feb6f9ec7125fdf67ffa7eefab",
                    "Labels": {
                        "com.docker.stack.namespace": "ourStack"
                    }
                },
                "Resources": {},
                "Placement": {
                    "Constraints": [
                        "node.platform.os == windows"
                    ]
                },
                "ForceUpdate": 0
            },
            "Mode": {
                "Replicated": {
                    "Replicas": 1
                }
            },
            "Networks": [
                {
                    "Target": "8mcvr2tcfgeacn16gulkkzkpb",
                    "Aliases": [
                        "asp-app"
                    ]
                }
            ],
            "EndpointSpec": {
                "Mode": "vip",
                "Ports": [
                    {
                        "Protocol": "tcp",
                        "TargetPort": 6000,
                        "PublishedPort": 6000,
                        "PublishMode": "ingress"
                    }
                ]
            }
        },
        "Endpoint": {
            "Spec": {
                "Mode": "vip",
                "Ports": [
                    {
                        "Protocol": "tcp",
                        "TargetPort": 6000,
                        "PublishedPort": 6000,
                        "PublishMode": "ingress"
                    }
                ]
            },
            "Ports": [
                {
                    "Protocol": "tcp",
                    "TargetPort": 6000,
                    "PublishedPort": 6000,
                    "PublishMode": "ingress"
                }
            ],
            "VirtualIPs": [
                {
                    "NetworkID": "fbopakq2nzt436rq1b2zv5ol7",
                    "Addr": "10.255.0.3/16"
                },
                {
                    "NetworkID": "8mcvr2tcfgeacn16gulkkzkpb",
                    "Addr": "10.0.0.2/24"
                }
            ]
        }
    }
]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository files or tests are named. Start by reproducing the Docker Swarm setup on Windows Server 2016 and Ubuntu nodes, then run the shown ping and docker service inspect checks from both containers. Done means the Windows ASP service can reach the Ubuntu Nginx service over the shared swarm network, with the cross-platform networking failure understood and addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, nginx
Domain
devops, distributed-systems, networking
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.