moby: Windows service discovery does not work consistently

Related to the functionality introduced in https://github.com/docker/docker/pull/25987

Description pinging a container by name does not always work in Windows containers. I have not yet found a consistent pattern but sometimes doing ‘ping [container-name]’ works and sometimes it fails. But I have never seen it fail if I include “ping [container-name]” as the command to execute when launching the container (rather than going into PowerShell).

Steps to reproduce the issue: This command always seems to work: docker run --rm -it --name testing microsoft/windowsservercore ping testing Instead do this: docker run --rm -it --name testing microsoft/windowsservercore Then inside the container: ping testing Usually it will always fail, but sometimes it will always work. If it works, exit the container, run the command and try again. It will fail. Note that “nslookup testing” always seem to work though.

Describe the results you received: See above

Describe the results you expected: Pinging by the container’s alias should always work.

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker version:

Client:
 Version:      1.14.0-dev
 API version:  1.26
 Go version:   go1.7.4
 Git commit:   fa5e097
 Built:        Fri Jan 27 17:05:28 2017
 OS/Arch:      windows/amd64

Server:
 Version:      1.14.0-dev
 API version:  1.26 (minimum version 1.24)
 Go version:   go1.7.4
 Git commit:   fa5e097
 Built:        Fri Jan 27 17:05:28 2017
 OS/Arch:      windows/amd64
 Experimental: false

Output of docker info:

Client:
 Version:      1.14.0-dev
 API version:  1.26
 Go version:   go1.7.4
 Git commit:   fa5e097
 Built:        Fri Jan 27 17:05:28 2017
 OS/Arch:      windows/amd64

Server:
 Version:      1.14.0-dev
 API version:  1.26 (minimum version 1.24)
 Go version:   go1.7.4
 Git commit:   fa5e097
 Built:        Fri Jan 27 17:05:28 2017
 OS/Arch:      windows/amd64
 Experimental: false
PS C:\Users\Administrator> docker info
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 470
Server Version: 1.14.0-dev
Storage Driver: windowsfilter
 Windows:
Logging Driver: json-file
Plugins:
 Volume: local
 Network: l2bridge l2tunnel nat null overlay transparent
Swarm: inactive
Default Isolation: process
Kernel Version: 10.0 14393 (14393.693.amd64fre.rs1_release.161220-1747)
Operating System: Windows Server 2016 Standard
OSType: windows
Architecture: x86_64
CPUs: 4
Total Memory: 8 GiB
Name: WIN-U9UU27TK2FQ
ID: HOYH:CLDY:C2SF:SJJN:VEN6:H2CS:FECI:QKIM:WA3K:3PJX:2QPE:F443
Docker Root Dir: C:\ProgramData\docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

Additional environment details (AWS, VirtualBox, physical, etc.): Server 2016 VM running under VirtualBox.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 24 (12 by maintainers)

Most upvoted comments

@friism I created an image with your temporary workaround and no longer can reproduce the issue by doing: docker run --rm --name pinger ping powershell ping pinger

@msabansal this seems really similar to the thing I saw with the Musicstore app.

@drnybble Maybe try this: https://github.com/aspnet/MusicStore/pull/713/files#diff-88a07c86b29f14008bf60577094d57d6R6