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

Windows Server 2016 docker cannot create networks #750

Closed
mechanic22 opened this issue May 15, 2017 · 69 comments
Closed

Windows Server 2016 docker cannot create networks #750

mechanic22 opened this issue May 15, 2017 · 69 comments

Comments

@mechanic22
Copy link

mechanic22 commented May 15, 2017

Expected behavior

Running docker network create would create a docker network
Is there a way to reset the HNS network or all of it back to factory defaults or something? It was working at one point, but no longer works.

Actual behavior

docker network create -d transparent mynet fails HNS failed with error : The Parameter is incorrect.
docker compose up -d without any parameters fails with HNS failed with error : The parameter is incorrect.

Information

I have tried uninstalling docker numerous times, i have removed the containers feature numerous time, i have rebooted between installs numerous times. I have uninstalled both then deleted the docker folder under ProgramData after taking ownership of all files. I uninstalled all then deleted the docker folders under program files.

I tried running CleanupContainerHostNetworking.ps1 with and with the force command

I have tried running numerous powershell scripts which say

  • Windows Server Standard 2016 I have HyperV running virtual machines
  • Event Viewer Error when running docker-compose

Handler for POST /v1.25/networks/create returned error: HNS failed with error : The parameter is incorrect.

  • Event Viewer Error when running docker network create

Handler for POST /v1.27/networks/create returned error: HNS failed with error : The parameter is incorrect.

I was at the point where the docker service wouldn't start, however I ran some powershell scripts to remove container networks and i am able to start the docker service again.

I have a WIndows Server Standard 2016 VM on the same machine and docker network create works just fine on it, I am having issues with it on the host

  • docker create output

PS C:\Users\Administrator> docker network create -d transparent mynet
Error response from daemon: HNS failed with error : Element not found.

  • docker compose output

PS D:\docker-composes-files\temp> docker-compose up -d
Creating network "temp_default" with the default driver
ERROR: HNS failed with error : The parameter is incorrect.

  • docker compose file
version: '3'
services:
  temp:
    image: docker.<myhost.com>/test/apis/temp
    container_name: temp
    environment:
     - PORT=9064
    ports:
     - "9064:9064"
  • docker run without creating a network runs fine

docker run -itd -p 9064:9064 -e PORT=9064 docker.<myhost.com>/test/apis/temp

  • docker info output

PS C:\Users\Administrator> docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 1
Server Version: 17.03.1-ee-3
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.1198.amd64fre.rs1_release_sec.170427-1353)
Operating System: Windows Server 2016 Standard
OSType: windows
Architecture: x86_64
CPUs: 8
Total Memory: 31.97 GiB
Name:
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
PS C:\Users\Administrator>

  • docker version output

PS C:\Users\Administrator> docker version
Client:
Version: 17.03.1-ee-3
API version: 1.27
Go version: go1.7.5
Git commit: 3fcee33
Built: Thu Mar 30 19:31:22 2017
OS/Arch: windows/amd64

Server:
Version: 17.03.1-ee-3
API version: 1.27 (minimum version 1.24)
Go version: go1.7.5
Git commit: 3fcee33
Built: Thu Mar 30 19:31:22 2017
OS/Arch: windows/amd64
Experimental: false

Steps to reproduce the behavior

I am not sure how to get it to the state I am in, but cant get docker to do any networking.
It seems like most commands I run involving docker network fail with HNS failed with error :

@friism
Copy link

friism commented May 15, 2017

  1. I think it's probably best to use the overlay driver
  2. I recommend upgrading to the latest Docker Edge release (17.05).
  3. You may need a build of compose with this fix: add exception for windows networking compose#4794 - binary here: https://ci.appveyor.com/project/docker/compose/build/master-3242/artifacts
  4. I'm not sure using the transparent driver is a good idea - overlay should work better. Here's a code example that uses the default networking: https://github.com/friism/MusicStore/blob/master/docker-compose.windows.yml

@mechanic22
Copy link
Author

The problem is i cannot create any networks without getting HNS failed with error

I tried docker create network -d overlay myoverlay

Error response from daemon: HNS failed with error : Element not found.

@mechanic22
Copy link
Author

mechanic22 commented May 15, 2017

I went through the uninstall again and deleted all docker folders and such and install the latest docker for windows edge release and am still getting the error here is some powershell output

PS C:\Users\Administrator> docker network create -d transparent mynet
Error response from daemon: HNS failed with error : Element not found.
PS C:\Users\Administrator> docker network create  mynet
Error response from daemon: plugin not found
PS C:\Users\Administrator> docker version
Client:
 Version:      17.05.0-ce
 API version:  1.29
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 21:43:09 2017
 OS/Arch:      windows/amd64

Server:
 Version:      17.05.0-ce
 API version:  1.29 (minimum version 1.24)
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 21:43:09 2017
 OS/Arch:      windows/amd64
 Experimental: true
PS C:\Users\Administrator> docker info
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 0
Server Version: 17.05.0-ce
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.1198.amd64fre.rs1_release_sec.170427-1353)
Operating System: Windows Server 2016 Standard
OSType: windows
Architecture: x86_64
CPUs: 8
Total Memory: 31.97GiB
Name: 
Docker Root Dir: C:\ProgramData\Docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: -1
 Goroutines: 17
 System Time: 2017-05-15T10:43:52.1959608-05:00
 EventsListeners: 0
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

@friism
Copy link

friism commented May 15, 2017

Is there are reason you're trying to use the transparent driver and not overlay?

@mechanic22
Copy link
Author

mechanic22 commented May 15, 2017

Running some check script

PS C:\Users\Administrator> iwr https://aka.ms/Debug-ContainerHost.ps1 -useb | iex
Checking for common problems
Describing Windows Version and Prerequisites
 [+] Is Windows 10 Anniversary Update or Windows Server 2016 103ms
 [+] Has KB3192366, KB3194496, or later installed if running Windows build 14393 34ms
 [+] Is not a build with blocking issues 25ms
 [+] Has 'Containers' feature installed 3.75s
Describing Docker is installed
 [+] A Docker service is installed - 'Docker' or 'com.Docker.Service'  58ms
 [+] Service is running 24ms
 [+] Docker.exe is in path 2.05s
 [+] Docker is registered in the EventLog service 88ms
Describing User has permissions to use Docker daemon
 [+] docker.exe should not return access denied 33ms
Describing Windows container settings are correct
 [+] Do not have DisableVSmbOplock set to 1 37ms
 [+] Do not have zz values set 32ms
 [+] Do not have FDVDenyWriteAccess set to 1 51ms
Describing The right container base images are installed
 [+] At least one of 'microsoft/windowsservercore' or 'microsoft/nanoserver' should be installed 120ms
Describing Container network is created
 [+] At least one local container network is available 1.7s
 [+] At least one NAT, Transparent, or L2Bridge Network exists 109ms
 [+] NAT Network's vSwitch is internal 30ms
 [+] A Windows NAT is configured if a Docker NAT network exists 59ms
 [+] Specified Network Gateway IP for NAT network is assigned to Host vNIC 57ms
 [+] NAT Network's internal prefix does not overlap with external IP' 27ms
Showing output from: docker info
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 1
Server Version: 17.05.0-ce
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.1198.amd64fre.rs1_release_sec.170427-1353)
Operating System: Windows Server 2016 Standard
OSType: windows
Architecture: x86_64
CPUs: 8
Total Memory: 31.97GiB
Name: WIN-OQAR0BRHIJ5
ID: M4IS:TIUE:AFMM:5HR3:KSMX:BXOR:OXVK:DOBA:QIKS:EV5U:N3H7:KOUX
Docker Root Dir: C:\ProgramData\Docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: -1
 Goroutines: 17
 System Time: 2017-05-15T11:03:00.5508959-05:00
 EventsListeners: 0
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false


Showing output from: docker version
Client:
 Version:      17.05.0-ce
 API version:  1.29
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 21:43:09 2017
 OS/Arch:      windows/amd64

Server:
 Version:      17.05.0-ce
 API version:  1.29 (minimum version 1.24)
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 21:43:09 2017
 OS/Arch:      windows/amd64
 Experimental: true

Showing output from: docker network ls
NETWORK ID          NAME                DRIVER              SCOPE
784c314f7b24        external-virtual    transparent         local
717523ecd49a        nat                 nat                 local
d557ed902d97        none                null                local

@mechanic22
Copy link
Author

mechanic22 commented May 15, 2017

And no there is no reason i am using transport instead of overlay.. please don't get hung up on that.

The problem I am having is I cannot create any docker networks.

@mechanic22
Copy link
Author

mechanic22 commented May 15, 2017

I tried the docker compose file for overlay you suggested

And immediately when i run docker-compose it fails with the error shown below

version: '3'
services:
  db:
    image: microsoft/mssql-server-windows-developer
    environment:
      sa_password: "Password1"
      ACCEPT_EULA: "Y"
    ports:
      - "1433:1433" # REMARK: This is currently required, needs investigation
    healthcheck:
      test: [ "CMD", "sqlcmd", "-U", "sa", "-P", "Password1", "-Q", "select 1" ]
      interval: 1s
      retries: 30

  web:
    build:
      context: .
      dockerfile: Dockerfile.windows
    environment:
      - "Data:DefaultConnection:ConnectionString=Server=db,1433;Database=MusicStore;User Id=sa;Password=Password1;MultipleActiveResultSets=True"
    depends_on:
      - db
    ports:
      - "5000:5000"
D:\docker-sites\music-store>docker-compose up -d
Creating network "musicstore_default" with the default driver
ERROR: HNS failed with error : The parameter is incorrect.

@mechanic22
Copy link
Author

mechanic22 commented May 15, 2017

Another note I tried the docker-compose file you put in 3. above and got the same results

@mechanic22
Copy link
Author

I have done all windows updates

Per windows update
Cumulative Update for Windows Server 2016 for x64-based Systems (KB4015217)
was successfully installed on 4/29/2017

@mechanic22
Copy link
Author

mechanic22 commented May 15, 2017

Ok - not sure what i did or what changed but now i am getting this error as i have been monkeying around quite a bit with random things

PS C:\Users\Administrator> docker network create -d overlay mynet
Error response from daemon: insufficient vnis(0) passed to overlay. Windows driver requires VNIs to be prepopulated

However docker compose on the music store still shows this

D:\docker-sites\music-store>docker-compose up -d
Creating network "musicstore_default" with the default driver
ERROR: HNS failed with error : The parameter is incorrect.

And if I just run create without a driver specified

D:\docker-sites\music-store>docker network create mynet
Error response from daemon: plugin not found

@friism
Copy link

friism commented May 15, 2017

ping @kallie-b @JMesser81

@mechanic22
Copy link
Author

Just tried uninstalling and reinstalling the latest windows updates and still have the same error messages

@kallie-b
Copy link

@mechanic22 - I'll help you out with this. Please:

  • Stop Docker: stop-service docker
  • Start the Docker daemon in debug mode: dockerd.exe -D
  • Open a new command prompt
  • Run docker network ls
  • Run Get-VMSwitch
  • Run Get-NetNat
  • Run Get-NetNatStaticMapping
  • Try creating a network
  • Post the output of the Docker daemon, and the commands that you run

@mechanic22
Copy link
Author

Commands

PS C:\Users\Administrator> docker network ls
NETWORK ID NAME DRIVER SCOPE
295e2fb54331 external-virtual transparent local
b6623ebe98e3 nat nat local
89ec7ff29d7d none null local
PS C:\Users\Administrator> Get-VMSwitch

Name SwitchType NetAdapterInterfaceDescription


external-virtual External Intel(R) 82574L Gigabit Network Connection
internal-virtual Internal
nat Internal

PS C:\Users\Administrator> Get-NetNat

Name : H86ba7d44-ccf2-4b0c-b6cb-1cf824bd155b
ExternalIPInterfaceAddressPrefix :
InternalIPInterfaceAddressPrefix : 172.25.16.0/20
IcmpQueryTimeout : 30
TcpEstablishedConnectionTimeout : 1800
TcpTransientConnectionTimeout : 120
TcpFilteringBehavior : AddressDependentFiltering
UdpFilteringBehavior : AddressDependentFiltering
UdpIdleSessionTimeout : 120
UdpInboundRefresh : False
Store : Local
Active : True

PS C:\Users\Administrator> Get-NetNatStaticMapping
PS C:\Users\Administrator> docker network create -d overlay mynet
Error response from daemon: HNS failed with error : Element not found.
PS C:\Users\Administrator>

Output

PS C:\Users\Administrator> stop-service docker
PS C:\Users\Administrator> dockerd.exe -D
time="2017-05-15T13:05:01.974444300-05:00" level=debug msg="Listener created for HTTP on npipe (//./pipe/docker_engine)"

time="2017-05-15T13:05:01.982436300-05:00" level=info msg="Windows default isolation mode: process"
time="2017-05-15T13:05:01.982436300-05:00" level=debug msg="Using default logging driver json-file"
time="2017-05-15T13:05:01.983435000-05:00" level=debug msg="WindowsGraphDriver InitFilter at C:\ProgramData\Docker\wi
ndowsfilter"
time="2017-05-15T13:05:01.983435000-05:00" level=info msg="[graphdriver] using prior storage driver: windowsfilter"
time="2017-05-15T13:05:01.983435000-05:00" level=debug msg="Using graph driver windowsfilter"
time="2017-05-15T13:05:01.984438200-05:00" level=debug msg="Max Concurrent Downloads: 3"
time="2017-05-15T13:05:01.984438200-05:00" level=debug msg="Max Concurrent Uploads: 5"
time="2017-05-15T13:05:01.993432700-05:00" level=info msg="Graph migration to content-addressability took 0.00 seconds"
time="2017-05-15T13:05:01.993432700-05:00" level=info msg="Loading containers: start."
time="2017-05-15T13:05:01.994432900-05:00" level=debug msg="Option Experimental: false"
time="2017-05-15T13:05:01.994432900-05:00" level=debug msg="Option DefaultDriver: nat"
time="2017-05-15T13:05:01.994432900-05:00" level=debug msg="Option DefaultNetwork: nat"
time="2017-05-15T13:05:02.113434500-05:00" level=debug msg="Network Response : [ { "CurrentEndpointCount" : 0, "Exter
nalInterfaceAddress" : "00-25-90-7F-E1-D4", "ExternalInterfaceIndex" : 15, "ID" : "86ba7d44-ccf2-4b0c-b6cb-1cf82
4bd155b", "MacPools" : [ { "EndMacAddress" : "00-15-5D-28-6F-FF", "StartMacAddress" : "00-15-5D-28-60-00" } ]
, "MaxConcurrentEndpoints" : 0, "NATName" : "H86ba7d44-ccf2-4b0c-b6cb-1cf824bd155b", "Name" : "nat", "Policie
s" : [ ], "Subnets" : [ { "AddressPrefix" : "172.25.16.0/20", "GatewayAddress" : "172.25.16.1" } ], "Switch
Guid" : "b0d504cf-c7bc-4923-9006-d5281f48a14e", "TotalEndpoints" : 0, "Type" : "nat", "Version" : 4294967297
}, { "CurrentEndpointCount" : 0, "ID" : "3112acac-c6bb-47c5-9681-6029e506f66e", "MacPools" : [ { "EndMacAddress
" : "00-15-5D-8D-FF-FF", "StartMacAddress" : "00-15-5D-8D-F0-00" } ], "MaxConcurrentEndpoints" : 0, "Name" :
"internal-virtual", "Policies" : [ ], "Subnets" : [ { "AddressPrefix" : "172.18.224.0/20" } ], "TotalEndpoin
ts" : 0, "Type" : "Private", "Version" : 4294967297 }, { "CurrentEndpointCount" : 0, "ID" : "35c1f26f-7feb-4
2f8-81ff-3fe58987b9a1", "MacPools" : [ { "EndMacAddress" : "00-15-5D-E3-FF-FF", "StartMacAddress" : "00-15-5D-
E3-F0-00" } ], "MaxConcurrentEndpoints" : 0, "Name" : "external-virtual", "Policies" : [ ], "TotalEndpoints"
: 0, "Type" : "Transparent", "Version" : 4294967297 } ]"
time="2017-05-15T13:05:02.131436000-05:00" level=debug msg="Launching DNS server for network%!(EXTRA string=none)"
time="2017-05-15T13:05:02.188434600-05:00" level=debug msg="releasing IPv4 pools from network nat (0cdaeede45ff57f044c66
4a4a38627049110ba0b156644eccc3720fcbbe355d1)"
time="2017-05-15T13:05:02.188434600-05:00" level=debug msg="ReleaseAddress(172.25.16.0/20, 172.25.16.1)"
time="2017-05-15T13:05:02.188434600-05:00" level=debug msg="ReleasePool(172.25.16.0/20)"
time="2017-05-15T13:05:02.215433300-05:00" level=debug msg="Allocating IPv4 pools for network nat (b6623ebe98e3523300bde
6f2182f484f506a8f0cf37a0b53c705e43ac1535802)"
time="2017-05-15T13:05:02.216433500-05:00" level=debug msg="RequestPool(LocalDefault, 172.25.16.0/20, , map[], false)"
time="2017-05-15T13:05:02.216433500-05:00" level=debug msg="RequestAddress(172.25.16.0/20, 172.25.16.1, map[RequestAddre
ssType:com.docker.network.gateway])"
time="2017-05-15T13:05:02.216433500-05:00" level=debug msg="Launching DNS server for network%!(EXTRA string=nat)"
time="2017-05-15T13:05:02.224434800-05:00" level=debug msg="Network Response : { "CurrentEndpointCount" : 0, "Externa
lInterfaceAddress" : "00-25-90-7F-E1-D4", "ExternalInterfaceIndex" : 15, "ID" : "86ba7d44-ccf2-4b0c-b6cb-1cf824b
d155b", "MacPools" : [ { "EndMacAddress" : "00-15-5D-28-6F-FF", "StartMacAddress" : "00-15-5D-28-60-00" } ],
"MaxConcurrentEndpoints" : 0, "NATName" : "H86ba7d44-ccf2-4b0c-b6cb-1cf824bd155b", "Name" : "nat", "Policies
" : [ ], "Subnets" : [ { "AddressPrefix" : "172.25.16.0/20", "GatewayAddress" : "172.25.16.1" } ], "SwitchGu
id" : "b0d504cf-c7bc-4923-9006-d5281f48a14e", "TotalEndpoints" : 0, "Type" : "nat", "Version" : 4294967297 }"

time="2017-05-15T13:05:02.224434800-05:00" level=debug msg="Binding a resolver on network nat gateway 172.25.16.1"
time="2017-05-15T13:05:02.225434700-05:00" level=debug msg="Resolver bound successfully for network nat"
time="2017-05-15T13:05:02.292435000-05:00" level=warning msg="Unable to locate plugin: private, retrying in 1s"
time="2017-05-15T13:05:03.293690900-05:00" level=warning msg="Unable to locate plugin: private, retrying in 2s"
time="2017-05-15T13:05:05.294847100-05:00" level=warning msg="Unable to locate plugin: private, retrying in 4s"
time="2017-05-15T13:05:09.294894700-05:00" level=warning msg="Unable to locate plugin: private, retrying in 8s"
time="2017-05-15T13:05:17.295028100-05:00" level=error msg="Error occurred when creating network plugin not found"
time="2017-05-15T13:05:17.347036600-05:00" level=debug msg="releasing IPv4 pools from network external-virtual (d011279d
d89b04bd156a60b4761fa8402e9e7baac46878655173f64a10b7abc6)"
time="2017-05-15T13:05:17.347036600-05:00" level=debug msg="ReleaseAddress(0.0.0.0/0, 0.0.0.0)"
time="2017-05-15T13:05:17.348032800-05:00" level=debug msg="ReleasePool(0.0.0.0/0)"
time="2017-05-15T13:05:17.378028500-05:00" level=debug msg="Allocating IPv4 pools for network external-virtual (295e2fb5
4331314a8257484dfab4225a37a44f3e862b166703fb480e698ad1f4)"
time="2017-05-15T13:05:17.378028500-05:00" level=debug msg="RequestPool(LocalDefault, , , map[], false)"
time="2017-05-15T13:05:17.380031300-05:00" level=debug msg="RequestAddress(0.0.0.0/0, , map[RequestAddressType:com.
docker.network.gateway])"
time="2017-05-15T13:05:17.381031200-05:00" level=debug msg="Launching DNS server for network%!(EXTRA string=external-vir
tual)"
time="2017-05-15T13:05:17.391030800-05:00" level=debug msg="Network Response : { "CurrentEndpointCount" : 0, "ID" :
"35c1f26f-7feb-42f8-81ff-3fe58987b9a1", "MacPools" : [ { "EndMacAddress" : "00-15-5D-E3-FF-FF", "StartMacAddres
s" : "00-15-5D-E3-F0-00" } ], "MaxConcurrentEndpoints" : 0, "Name" : "external-virtual", "Policies" : [ ],
"TotalEndpoints" : 0, "Type" : "Transparent", "Version" : 4294967297 }"
time="2017-05-15T13:05:17.433028300-05:00" level=info msg="Loading containers: done."
time="2017-05-15T13:05:17.449029000-05:00" level=debug msg="Stackdump - waiting signal at Global\docker-daemon-5384"
time="2017-05-15T13:05:17.450029200-05:00" level=info msg="Daemon has completed initialization"
time="2017-05-15T13:05:17.450029200-05:00" level=info msg="Docker daemon" commit=3fcee33 graphdriver=windowsfilter versi
on=17.03.1-ee-3
time="2017-05-15T13:05:17.451029400-05:00" level=debug msg="Registering routers"
time="2017-05-15T13:05:17.454027000-05:00" level=debug msg="Registering GET, /containers/{name:.}/checkpoints"
time="2017-05-15T13:05:17.454027000-05:00" level=debug msg="Registering POST, /containers/{name:.
}/checkpoints"
time="2017-05-15T13:05:17.455030500-05:00" level=debug msg="Registering DELETE, /containers/{name}/checkpoints/{checkpoi
nt}"
time="2017-05-15T13:05:17.456031000-05:00" level=debug msg="Registering HEAD, /containers/{name:.}/archive"
time="2017-05-15T13:05:17.456031000-05:00" level=debug msg="Registering GET, /containers/json"
time="2017-05-15T13:05:17.457029400-05:00" level=debug msg="Registering GET, /containers/{name:.
}/export"
time="2017-05-15T13:05:17.457029400-05:00" level=debug msg="Registering GET, /containers/{name:.}/changes"
time="2017-05-15T13:05:17.458030500-05:00" level=debug msg="Registering GET, /containers/{name:.
}/json"
time="2017-05-15T13:05:17.458030500-05:00" level=debug msg="Registering GET, /containers/{name:.}/top"
time="2017-05-15T13:05:17.459030100-05:00" level=debug msg="Registering GET, /containers/{name:.
}/logs"
time="2017-05-15T13:05:17.460031800-05:00" level=debug msg="Registering GET, /containers/{name:.}/stats"
time="2017-05-15T13:05:17.460031800-05:00" level=debug msg="Registering GET, /containers/{name:.
}/attach/ws"
time="2017-05-15T13:05:17.461030800-05:00" level=debug msg="Registering GET, /exec/{id:.}/json"
time="2017-05-15T13:05:17.461030800-05:00" level=debug msg="Registering GET, /containers/{name:.
}/archive"
time="2017-05-15T13:05:17.462029200-05:00" level=debug msg="Registering POST, /containers/create"
time="2017-05-15T13:05:17.465028000-05:00" level=debug msg="Registering POST, /containers/{name:.}/kill"
time="2017-05-15T13:05:17.465028000-05:00" level=debug msg="Registering POST, /containers/{name:.
}/pause"
time="2017-05-15T13:05:17.466027300-05:00" level=debug msg="Registering POST, /containers/{name:.}/unpause"
time="2017-05-15T13:05:17.467028400-05:00" level=debug msg="Registering POST, /containers/{name:.
}/restart"
time="2017-05-15T13:05:17.468025300-05:00" level=debug msg="Registering POST, /containers/{name:.}/start"
time="2017-05-15T13:05:17.468025300-05:00" level=debug msg="Registering POST, /containers/{name:.
}/stop"
time="2017-05-15T13:05:17.469030300-05:00" level=debug msg="Registering POST, /containers/{name:.}/wait"
time="2017-05-15T13:05:17.469030300-05:00" level=debug msg="Registering POST, /containers/{name:.
}/resize"
time="2017-05-15T13:05:17.470029600-05:00" level=debug msg="Registering POST, /containers/{name:.}/attach"
time="2017-05-15T13:05:17.471026200-05:00" level=debug msg="Registering POST, /containers/{name:.
}/copy"
time="2017-05-15T13:05:17.471026200-05:00" level=debug msg="Registering POST, /containers/{name:.}/exec"
time="2017-05-15T13:05:17.472025800-05:00" level=debug msg="Registering POST, /exec/{name:.
}/start"
time="2017-05-15T13:05:17.472025800-05:00" level=debug msg="Registering POST, /exec/{name:.}/resize"
time="2017-05-15T13:05:17.473025100-05:00" level=debug msg="Registering POST, /containers/{name:.
}/rename"
time="2017-05-15T13:05:17.475026100-05:00" level=debug msg="Registering POST, /containers/{name:.}/update"
time="2017-05-15T13:05:17.477029500-05:00" level=debug msg="Registering POST, /containers/prune"
time="2017-05-15T13:05:17.478028200-05:00" level=debug msg="Registering PUT, /containers/{name:.
}/archive"
time="2017-05-15T13:05:17.480025500-05:00" level=debug msg="Registering DELETE, /containers/{name:.}"
time="2017-05-15T13:05:17.480025500-05:00" level=debug msg="Registering GET, /images/json"
time="2017-05-15T13:05:17.483030000-05:00" level=debug msg="Registering GET, /images/search"
time="2017-05-15T13:05:17.483030000-05:00" level=debug msg="Registering GET, /images/get"
time="2017-05-15T13:05:17.484031100-05:00" level=debug msg="Registering GET, /images/{name:.
}/get"
time="2017-05-15T13:05:17.486031800-05:00" level=debug msg="Registering GET, /images/{name:.}/history"
time="2017-05-15T13:05:17.487031400-05:00" level=debug msg="Registering GET, /images/{name:.
}/json"
time="2017-05-15T13:05:17.487031400-05:00" level=debug msg="Registering POST, /commit"
time="2017-05-15T13:05:17.488027700-05:00" level=debug msg="Registering POST, /images/load"
time="2017-05-15T13:05:17.489032700-05:00" level=debug msg="Registering POST, /images/create"
time="2017-05-15T13:05:17.489032700-05:00" level=debug msg="Registering POST, /images/{name:.}/push"
time="2017-05-15T13:05:17.490031100-05:00" level=debug msg="Registering POST, /images/{name:.
}/tag"
time="2017-05-15T13:05:17.491032200-05:00" level=debug msg="Registering POST, /images/prune"
time="2017-05-15T13:05:17.491032200-05:00" level=debug msg="Registering DELETE, /images/{name:.}"
time="2017-05-15T13:05:17.492029700-05:00" level=debug msg="Registering OPTIONS, /{anyroute:.
}"
time="2017-05-15T13:05:17.492029700-05:00" level=debug msg="Registering GET, /_ping"
time="2017-05-15T13:05:17.493028700-05:00" level=debug msg="Registering GET, /events"
time="2017-05-15T13:05:17.493028700-05:00" level=debug msg="Registering GET, /info"
time="2017-05-15T13:05:17.499024800-05:00" level=debug msg="Registering GET, /version"
time="2017-05-15T13:05:17.500029800-05:00" level=debug msg="Registering GET, /system/df"
time="2017-05-15T13:05:17.501029700-05:00" level=debug msg="Registering POST, /auth"
time="2017-05-15T13:05:17.501029700-05:00" level=debug msg="Registering GET, /volumes"
time="2017-05-15T13:05:17.502029600-05:00" level=debug msg="Registering GET, /volumes/{name:.}"
time="2017-05-15T13:05:17.502029600-05:00" level=debug msg="Registering POST, /volumes/create"
time="2017-05-15T13:05:17.503033700-05:00" level=debug msg="Registering POST, /volumes/prune"
time="2017-05-15T13:05:17.505026300-05:00" level=debug msg="Registering DELETE, /volumes/{name:.
}"
time="2017-05-15T13:05:17.505026300-05:00" level=debug msg="Registering POST, /build"
time="2017-05-15T13:05:17.506025600-05:00" level=debug msg="Registering POST, /swarm/init"
time="2017-05-15T13:05:17.506025600-05:00" level=debug msg="Registering POST, /swarm/join"
time="2017-05-15T13:05:17.507025800-05:00" level=debug msg="Registering POST, /swarm/leave"
time="2017-05-15T13:05:17.508025700-05:00" level=debug msg="Registering GET, /swarm"
time="2017-05-15T13:05:17.510025400-05:00" level=debug msg="Registering GET, /swarm/unlockkey"
time="2017-05-15T13:05:17.511025600-05:00" level=debug msg="Registering POST, /swarm/update"
time="2017-05-15T13:05:17.511025600-05:00" level=debug msg="Registering POST, /swarm/unlock"
time="2017-05-15T13:05:17.512026400-05:00" level=debug msg="Registering GET, /services"
time="2017-05-15T13:05:17.512026400-05:00" level=debug msg="Registering GET, /services/{id}"
time="2017-05-15T13:05:17.513026900-05:00" level=debug msg="Registering POST, /services/create"
time="2017-05-15T13:05:17.514030500-05:00" level=debug msg="Registering POST, /services/{id}/update"
time="2017-05-15T13:05:17.514030500-05:00" level=debug msg="Registering DELETE, /services/{id}"
time="2017-05-15T13:05:17.515031900-05:00" level=debug msg="Registering GET, /services/{id}/logs"
time="2017-05-15T13:05:17.515031900-05:00" level=debug msg="Registering GET, /nodes"
time="2017-05-15T13:05:17.516030900-05:00" level=debug msg="Registering GET, /nodes/{id}"
time="2017-05-15T13:05:17.516030900-05:00" level=debug msg="Registering DELETE, /nodes/{id}"
time="2017-05-15T13:05:17.517032300-05:00" level=debug msg="Registering POST, /nodes/{id}/update"
time="2017-05-15T13:05:17.518033700-05:00" level=debug msg="Registering GET, /tasks"
time="2017-05-15T13:05:17.518033700-05:00" level=debug msg="Registering GET, /tasks/{id}"
time="2017-05-15T13:05:17.519033600-05:00" level=debug msg="Registering GET, /secrets"
time="2017-05-15T13:05:17.521029700-05:00" level=debug msg="Registering POST, /secrets/create"
time="2017-05-15T13:05:17.522028400-05:00" level=debug msg="Registering DELETE, /secrets/{id}"
time="2017-05-15T13:05:17.522028400-05:00" level=debug msg="Registering GET, /secrets/{id}"
time="2017-05-15T13:05:17.523032200-05:00" level=debug msg="Registering POST, /secrets/{id}/update"
time="2017-05-15T13:05:17.523032200-05:00" level=debug msg="Registering GET, /plugins"
time="2017-05-15T13:05:17.524030600-05:00" level=debug msg="Registering GET, /plugins/{name:.}/json"
time="2017-05-15T13:05:17.524030600-05:00" level=debug msg="Registering GET, /plugins/privileges"
time="2017-05-15T13:05:17.525029300-05:00" level=debug msg="Registering DELETE, /plugins/{name:.
}"
time="2017-05-15T13:05:17.525029300-05:00" level=debug msg="Registering POST, /plugins/{name:.}/enable"
time="2017-05-15T13:05:17.526028900-05:00" level=debug msg="Registering POST, /plugins/{name:.
}/disable"
time="2017-05-15T13:05:17.526028900-05:00" level=debug msg="Registering POST, /plugins/pull"
time="2017-05-15T13:05:17.527033900-05:00" level=debug msg="Registering POST, /plugins/{name:.}/push"
time="2017-05-15T13:05:17.528027800-05:00" level=debug msg="Registering POST, /plugins/{name:.
}/upgrade"
time="2017-05-15T13:05:17.529030100-05:00" level=debug msg="Registering POST, /plugins/{name:.}/set"
time="2017-05-15T13:05:17.529030100-05:00" level=debug msg="Registering POST, /plugins/create"
time="2017-05-15T13:05:17.530031200-05:00" level=debug msg="Registering GET, /networks"
time="2017-05-15T13:05:17.533029700-05:00" level=debug msg="Registering GET, /networks/"
time="2017-05-15T13:05:17.533029700-05:00" level=debug msg="Registering GET, /networks/{id:.+}"
time="2017-05-15T13:05:17.534031400-05:00" level=debug msg="Registering POST, /networks/create"
time="2017-05-15T13:05:17.534031400-05:00" level=debug msg="Registering POST, /networks/{id:.
}/connect"
time="2017-05-15T13:05:17.535027700-05:00" level=debug msg="Registering POST, /networks/{id:.}/disconnect"
time="2017-05-15T13:05:17.536031500-05:00" level=debug msg="Registering POST, /networks/prune"
time="2017-05-15T13:05:17.536031500-05:00" level=debug msg="Registering DELETE, /networks/{id:.
}"
time="2017-05-15T13:05:17.537028400-05:00" level=info msg="API listen on //./pipe/docker_engine"
time="2017-05-15T13:05:17.537028400-05:00" level=debug msg="Config reload - waiting signal at Global\docker-daemon-conf
ig-5384"
time="2017-05-15T13:05:17.540027500-05:00" level=debug msg="Calling GET /_ping"
time="2017-05-15T13:05:17.546029000-05:00" level=debug msg="Calling GET /v1.27/networks"
time="2017-05-15T13:06:03.037887500-05:00" level=debug msg="Calling GET /_ping"
time="2017-05-15T13:06:03.038887100-05:00" level=debug msg="Calling POST /v1.27/networks/create"
time="2017-05-15T13:06:03.038887100-05:00" level=debug msg="form data: {"Attachable":false,"CheckDuplicate":true,"D
river":"overlay","EnableIPv6":false,"IPAM":{"Config":[],"Driver":"default","Options":{}},"Internal":fal
se,"Labels":{},"Name":"mynet","Options":{}}"
time="2017-05-15T13:06:03.055887400-05:00" level=debug msg="Allocating IPv4 pools for network mynet (d9e00a3e7c8309f282c
41539643f83a23d5ce3ae92733f9a4ce51fd57a205f43)"
time="2017-05-15T13:06:03.055887400-05:00" level=debug msg="RequestPool(GlobalDefault, , , map[], false)"
time="2017-05-15T13:06:03.057887500-05:00" level=debug msg="RequestAddress(GlobalDefault/10.0.0.0/24, , map[Request
AddressType:com.docker.network.gateway])"
time="2017-05-15T13:06:03.066888700-05:00" level=info msg="HNSNetwork Request ={"Name":"d9e00a3e7c8309f282c41539643f8
3a23d5ce3ae92733f9a4ce51fd57a205f43","Type":"overlay","Subnets":[{"AddressPrefix":"10.0.0.0/24","GatewayAddr
ess":"10.0.0.1","Policies":[{"Type":"VSID","VSID":0}]}]}"
time="2017-05-15T13:06:03.112890600-05:00" level=debug msg="releasing IPv4 pools from network mynet (d9e00a3e7c8309f282c
41539643f83a23d5ce3ae92733f9a4ce51fd57a205f43)"
time="2017-05-15T13:06:03.112890600-05:00" level=debug msg="ReleaseAddress(GlobalDefault/10.0.0.0/24, 10.0.0.1)"
time="2017-05-15T13:06:03.114888000-05:00" level=debug msg="ReleasePool(GlobalDefault/10.0.0.0/24)"
time="2017-05-15T13:06:03.115889400-05:00" level=error msg="Handler for POST /v1.27/networks/create returned error: HNS
failed with error : Element not found. "

@mechanic22
Copy link
Author

mechanic22 commented May 15, 2017

If it helps i tried the docker compose command on the music store docker-compose.yml

Command

D:\docker-sites\music-store>docker-compose up -d
Creating network "musicstore_default" with the default driver
ERROR: HNS failed with error : The parameter is incorrect.

Output

time="2017-05-15T13:12:57.737206500-05:00" level=debug msg="Calling GET /v1.25/info"
time="2017-05-15T13:12:57.751206200-05:00" level=debug msg="Calling GET /v1.25/networks/musicstore_default"
time="2017-05-15T13:12:57.769205300-05:00" level=error msg="Handler for GET /v1.25/networks/musicstore_default returned error: network musicstore_default not found"
time="2017-05-15T13:12:57.775213400-05:00" level=debug msg="Calling POST /v1.25/networks/create"
time="2017-05-15T13:12:57.775213400-05:00" level=debug msg="form data: {"Attachable":true,"Labels":{"com.docker.compose.network":"default","com.docker.compose.project":"musicstore"},"Name":"musicstore_default"}"
time="2017-05-15T13:12:57.791206000-05:00" level=debug msg="Allocating IPv4 pools for network musicstore_default (8a742991e3ac7b0029ea46bca55b05225cd8bb91400f55270a2ad4c76ce76281)"
time="2017-05-15T13:12:57.791206000-05:00" level=debug msg="RequestPool(LocalDefault, , , map[], false)"
time="2017-05-15T13:12:57.792215900-05:00" level=debug msg="RequestAddress(0.0.0.0/0, , map[RequestAddressType:com.docker.network.gateway])"
time="2017-05-15T13:12:57.792215900-05:00" level=debug msg="HNSNetwork Request ={"Name":"8a742991e3ac7b0029ea46bca55b05225cd8bb91400f55270a2ad4c76ce76281","Type":"nat","Subnets":[{"AddressPrefix":"0.0.0.0/0","GatewayAddress":"0.0.
0.0"}]} Address Space=[{0.0.0.0/0 0.0.0.0 []}]"
time="2017-05-15T13:12:57.838213900-05:00" level=debug msg="releasing IPv4 pools from network musicstore_default (8a742991e3ac7b0029ea46bca55b05225cd8bb91400f55270a2ad4c76ce76281)"
time="2017-05-15T13:12:57.838213900-05:00" level=debug msg="ReleaseAddress(0.0.0.0/0, 0.0.0.0)"
time="2017-05-15T13:12:57.838213900-05:00" level=debug msg="ReleasePool(0.0.0.0/0)"
time="2017-05-15T13:12:57.839216300-05:00" level=error msg="Handler for POST /v1.25/networks/create returned error: HNS failed with error : The parameter is incorrect. "

@kallie-b
Copy link

@mechanic22 -- Thank you! I'll check with my team on the error you're getting and get back to you ASAP.

@kallie-b
Copy link

@mechanic22 -- could you please do ipconfig /all. Apologies, this should have been in the list I gave you above.

@mechanic22
Copy link
Author

mechanic22 commented May 15, 2017

D:\docker-sites\music-store>ipconfig /all

Windows IP Configuration

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

Ethernet adapter Ethernet 2:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) 82579LM Gigabit Network Connection
Physical Address. . . . . . . . . : 00-25-90-7F-E1-D5
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes

Ethernet adapter vEthernet (HNS Internal NIC):

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter
Physical Address. . . . . . . . . : 00-15-5D-28-69-52
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::ad9c:5245:606d:cc3a%13(Preferred)
IPv4 Address. . . . . . . . . . . : 172.25.16.1(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.240.0
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 167777629
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-20-96-12-25-00-25-90-7F-E1-D4
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1
NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter vEthernet (internal-virtual):

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #2
Physical Address. . . . . . . . . : 00-15-5D-98-52-17
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::6103:8a60:bac8:a227%21(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.137.1(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 553653597
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-20-96-12-25-00-25-90-7F-E1-D4
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1
NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter vEthernet (external-virtual):

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #3
Physical Address. . . . . . . . . : 00-25-90-7F-E1-D4
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : xxx.xxx.xxx.82(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.248
Default Gateway . . . . . . . . . : xxx.xxx.xxx.81
DHCPv6 IAID . . . . . . . . . . . : 352331152
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-20-96-12-25-00-25-90-7F-E1-D4
DNS Servers . . . . . . . . . . . : 8.8.8.8
8.8.4.4
NetBIOS over Tcpip. . . . . . . . : Enabled

Tunnel adapter isatap.{C514C027-2ED3-45AC-AD93-6C8E57840B1C}:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.{961E58C7-A1D1-4CC3-B9B5-303DD4CFD1EC}:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter #3
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.{6F25CD67-A9C5-45CF-BCC6-15B7E4143594}:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter #4
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes

@mechanic22
Copy link
Author

Do you know if there is a way to reset or reinstall the HNS stuff? That is pretty much the only thing I havent reinstalled at this point that I can think of

@dineshgovindasamy
Copy link

You have multiple networks created and we have to clean them up.

Could you please do the following?

get-containernetwork | remove-containernetwork

post that can u do ipconfig /all

@dineshgovindasamy
Copy link

also please remove the node from swarm before deleting the container networks

@mechanic22
Copy link
Author

mechanic22 commented May 16, 2017

PS C:\Users\Administrator> docker swarm leave
Error response from daemon: This node is not part of a swarm
PS C:\Users\Administrator> get-containernetwork | remove-containernetwork
PS C:\Users\Administrator> ipconfig /all

Windows IP Configuration

Host Name . . . . . . . . . . . . : WIN-EOMPQ7PL1M9
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Mixed
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Ethernet 5:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter #5
Physical Address. . . . . . . . . : 00-15-5D-98-52-19
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::ccfd:1bc8:5de5:39bd%14(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.137.52(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 469767517
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-20-AB-97-F3-00-15-5D-98-52-18
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1
NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter Ethernet 4:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter #4
Physical Address. . . . . . . . . : 00-15-5D-98-52-18
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : xxx.xxx.xxx.85(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.248
Default Gateway . . . . . . . . . : xxx.xxx.xxx.81
DHCPv6 IAID . . . . . . . . . . . : 452990301
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-20-AB-97-F3-00-15-5D-98-52-18
DNS Servers . . . . . . . . . . . : 8.8.8.8
8.8.4.4
NetBIOS over Tcpip. . . . . . . . : Enabled

Tunnel adapter isatap.{E5D27DFD-24BB-4EAC-83C8-4747DC49E28F}:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter #5
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.{816FAF62-6EA5-475D-8428-1A1372EDAC4B}:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter #6
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes

@dineshgovindasamy
Copy link

Perfect thanks. Could you please do the following?

stop-service hns
stop-service docker
del 'C:\ProgramData\Microsoft\Windows\hns\hns.data'
start-service hns
start-service docker

after this

docker network ls
get-containernetwork

ipconfig /all

Hope this helps.

@mechanic22
Copy link
Author

mechanic22 commented May 16, 2017

PS C:\Users\Administrator> stop-service hns
PS C:\Users\Administrator> stop-service docker
PS C:\Users\Administrator> del 'C:\ProgramData\Microsoft\Windows\hns\hns.data'
PS C:\Users\Administrator> start-service hns
PS C:\Users\Administrator> start-service docker
WARNING: Waiting for service 'docker (Docker)' to start...
PS C:\Users\Administrator> docker network ls
NETWORK ID NAME DRIVER SCOPE
d232a5d36320 nat nat local
b52e236b2eae none null local
PS C:\Users\Administrator> get-containernetwork

Name Id Subnets Mode SourceMac DNSServers DNSSuffix

nat 02821e95-95e2-4894-b211-81a8bff7d80d {172.25.0.0/20} NAT

PS C:\Users\Administrator> ipconfig /all

Windows IP Configuration

Host Name . . . . . . . . . . . . : WIN-EOMPQ7PL1M9
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Mixed
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter vEthernet (HNS Internal NIC):

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter
Physical Address. . . . . . . . . : 00-15-5D-AB-59-25
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::60ff:ea9a:ad62:e062%23(Preferred)
IPv4 Address. . . . . . . . . . . : 172.25.0.1(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.240.0
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 385881437
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-20-AB-97-F3-00-15-5D-98-52-18
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1
NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter Ethernet 5:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter #5
Physical Address. . . . . . . . . : 00-15-5D-98-52-19
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::ccfd:1bc8:5de5:39bd%14(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.137.52(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 469767517
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-20-AB-97-F3-00-15-5D-98-52-18
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1
NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter Ethernet 4:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter #4
Physical Address. . . . . . . . . : 00-15-5D-98-52-18
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : xxx.xxx.xxx.85(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.248
Default Gateway . . . . . . . . . : xxx.xxx.xxx.81
DHCPv6 IAID . . . . . . . . . . . : 452990301
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-20-AB-97-F3-00-15-5D-98-52-18
DNS Servers . . . . . . . . . . . : 8.8.8.8
8.8.4.4
NetBIOS over Tcpip. . . . . . . . : Enabled

Tunnel adapter isatap.{72602B2A-CF65-46F5-8651-97E770CBFFB3}:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.{E5D27DFD-24BB-4EAC-83C8-4747DC49E28F}:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter #5
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.{816FAF62-6EA5-475D-8428-1A1372EDAC4B}:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter #6
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes

@dineshgovindasamy
Copy link

Now HNS is cleaned up. Can you please try running your compose command and see if it works.

Background on the issue you are facing

if we have transparent or overlay network, then the physical adapter is bound to the switch so creating another network to bind the same nic fails with Invalid parameter(We should have given a better error).

You should be able to remove-containernetwork that specific network which should clean up itself

@mechanic22
Copy link
Author

mechanic22 commented May 16, 2017

Shoot i ran that last bit on the wrong server

Sorry

However i tried it on the actual broken server and got these results

PS C:\Users\Administrator> stop-service hns
PS C:\Users\Administrator> stop-service docker
PS C:\Users\Administrator> del 'C:\ProgramData\Microsoft\Windows\hns\hns.data'
PS C:\Users\Administrator> start-service hns
PS C:\Users\Administrator> start-service docker
WARNING: Waiting for service 'docker (Docker)' to start...
WARNING: Waiting for service 'docker (Docker)' to start...
WARNING: Waiting for service 'docker (Docker)' to start...
WARNING: Waiting for service 'docker (Docker)' to start...
WARNING: Waiting for service 'docker (Docker)' to start...
WARNING: Waiting for service 'docker (Docker)' to start...
WARNING: Waiting for service 'docker (Docker)' to start...
start-service : Failed to start service 'docker (Docker)'.
At line:1 char:1
+ start-service docker
+ ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service], ServiceCommandException
    + FullyQualifiedErrorId : StartServiceFailed,Microsoft.PowerShell.Commands.StartServiceCommand

I then ran the docker daemon debug and this is the error


PS C:\Users\Administrator> dockerd.exe -D
time="2017-05-16T13:06:39.063329300-05:00" level=debug msg="Listener created for HTTP on npipe (//./pipe/docker_engine)"
time="2017-05-16T13:06:39.075322500-05:00" level=info msg="Windows default isolation mode: process"
time="2017-05-16T13:06:39.076314600-05:00" level=debug msg="Using default logging driver json-file"
time="2017-05-16T13:06:39.078317200-05:00" level=debug msg="WindowsGraphDriver InitFilter at C:\\ProgramData\\Docker\\windowsfilter"
time="2017-05-16T13:06:39.078317200-05:00" level=info msg="[graphdriver] using prior storage driver: windowsfilter"
time="2017-05-16T13:06:39.079323100-05:00" level=debug msg="Using graph driver windowsfilter"
time="2017-05-16T13:06:39.081321800-05:00" level=debug msg="Max Concurrent Downloads: 3"
time="2017-05-16T13:06:39.084324000-05:00" level=debug msg="Max Concurrent Uploads: 5"
time="2017-05-16T13:06:39.093318300-05:00" level=info msg="Graph migration to content-addressability took 0.00 seconds"
time="2017-05-16T13:06:39.094325500-05:00" level=info msg="Loading containers: start."
time="2017-05-16T13:06:39.096318400-05:00" level=debug msg="Option Experimental: false"
time="2017-05-16T13:06:39.096318400-05:00" level=debug msg="Option DefaultDriver: nat"
time="2017-05-16T13:06:39.098316800-05:00" level=debug msg="Option DefaultNetwork: nat"
time="2017-05-16T13:06:39.219322800-05:00" level=debug msg="Network Response : [ { \"CurrentEndpointCount\" : 0, \"ID\" : \"c0841917-2518-4530-9c89-b9297fdaf52f\", \"MacPools\" : [ { \"EndMacAddress\" : \"00-15-5D-C9-DF-FF\", \"StartMacAddress\" :
 \"00-15-5D-C9-D0-00\" } ], \"MaxConcurrentEndpoints\" : 0, \"Name\" : \"internal-virtual\", \"Policies\" : [  ], \"Subnets\" : [ { \"AddressPrefix\" : \"172.18.176.0/20\" } ], \"TotalEndpoints\" : 0, \"Type\" : \"Private\", \"Version\" : 42949672
97 }, { \"CurrentEndpointCount\" : 0, \"ID\" : \"9b606c55-4056-4ca7-a6bf-0d0fc2237304\", \"MacPools\" : [ { \"EndMacAddress\" : \"00-15-5D-80-1F-FF\", \"StartMacAddress\" : \"00-15-5D-80-10-00\" } ], \"MaxConcurrentEndpoints\" : 0, \"Name\" : \"ex
ternal-virtual\", \"Policies\" : [  ], \"TotalEndpoints\" : 0, \"Type\" : \"Transparent\", \"Version\" : 4294967297 } ]"
time="2017-05-16T13:06:39.235323900-05:00" level=debug msg="Launching DNS server for network%!(EXTRA string=none)"
time="2017-05-16T13:06:39.280323100-05:00" level=warning msg="Unable to locate plugin: private, retrying in 1s"
time="2017-05-16T13:06:40.281392000-05:00" level=warning msg="Unable to locate plugin: private, retrying in 2s"
time="2017-05-16T13:06:42.283357800-05:00" level=warning msg="Unable to locate plugin: private, retrying in 4s"
time="2017-05-16T13:06:46.283686400-05:00" level=warning msg="Unable to locate plugin: private, retrying in 8s"
time="2017-05-16T13:06:54.284368600-05:00" level=error msg="Error occurred when creating network plugin not found"
time="2017-05-16T13:06:54.314368300-05:00" level=debug msg="releasing IPv4 pools from network external-virtual (f240ba92172b9ffac462bac3a13374c55deca9ab68efd81b6ba9e27cdf58fb5a)"
time="2017-05-16T13:06:54.314368300-05:00" level=debug msg="ReleaseAddress(0.0.0.0/0, 0.0.0.0)"
time="2017-05-16T13:06:54.316374800-05:00" level=debug msg="ReleasePool(0.0.0.0/0)"
time="2017-05-16T13:06:54.345370600-05:00" level=debug msg="Allocating IPv4 pools for network external-virtual (aa86060efb36860a3159aef22e449f70d890c06e5d8d082770e837d1f34a5b86)"
time="2017-05-16T13:06:54.346372300-05:00" level=debug msg="RequestPool(LocalDefault, , , map[], false)"
time="2017-05-16T13:06:54.348373700-05:00" level=debug msg="RequestAddress(0.0.0.0/0, <nil>, map[RequestAddressType:com.docker.network.gateway])"
time="2017-05-16T13:06:54.349374500-05:00" level=debug msg="Launching DNS server for network%!(EXTRA string=external-virtual)"
time="2017-05-16T13:06:54.360370400-05:00" level=debug msg="Network Response : { \"CurrentEndpointCount\" : 0, \"ID\" : \"9b606c55-4056-4ca7-a6bf-0d0fc2237304\", \"MacPools\" : [ { \"EndMacAddress\" : \"00-15-5D-80-1F-FF\", \"StartMacAddress\" : \
"00-15-5D-80-10-00\" } ], \"MaxConcurrentEndpoints\" : 0, \"Name\" : \"external-virtual\", \"Policies\" : [  ], \"TotalEndpoints\" : 0, \"Type\" : \"Transparent\", \"Version\" : 4294967297 }"
time="2017-05-16T13:06:54.399370100-05:00" level=debug msg="Allocating IPv4 pools for network nat (d599918416c6c299baa0a527e2858765004cc22921cebf9700f725a5fab9d2cf)"
time="2017-05-16T13:06:54.399370100-05:00" level=debug msg="RequestPool(LocalDefault, , , map[], false)"
time="2017-05-16T13:06:54.402373500-05:00" level=debug msg="RequestAddress(0.0.0.0/0, <nil>, map[RequestAddressType:com.docker.network.gateway])"
time="2017-05-16T13:06:54.404377500-05:00" level=debug msg="HNSNetwork Request ={\"Name\":\"nat\",\"Type\":\"nat\",\"Subnets\":[{\"AddressPrefix\":\"0.0.0.0/0\",\"GatewayAddress\":\"0.0.0.0\"}]} Address Space=[{0.0.0.0/0 0.0.0.0 []}]"
time="2017-05-16T13:06:54.486375000-05:00" level=debug msg="releasing IPv4 pools from network nat (d599918416c6c299baa0a527e2858765004cc22921cebf9700f725a5fab9d2cf)"
time="2017-05-16T13:06:54.486375000-05:00" level=debug msg="ReleaseAddress(0.0.0.0/0, 0.0.0.0)"
time="2017-05-16T13:06:54.488380900-05:00" level=debug msg="ReleasePool(0.0.0.0/0)"
time="2017-05-16T13:06:54.490372900-05:00" level=debug msg="start clean shutdown of all containers with a 15 seconds timeout..."
Error starting daemon: Error initializing network controller: Error creating default network: HNS failed with error : The parameter is incorrect.

@dineshgovindasamy
Copy link

Can you please do ipconfig /all?

@mechanic22
Copy link
Author

mechanic22 commented May 16, 2017

Here you go

PS C:\Users\Administrator> ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : WIN-OQAR0BRHIJ5
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Ethernet 2:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Intel(R) 82579LM Gigabit Network Connection
   Physical Address. . . . . . . . . : 00-25-90-7F-E1-D5
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Ethernet adapter vEthernet (HNS Internal NIC):

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter
   Physical Address. . . . . . . . . : 00-15-5D-28-69-52
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Ethernet adapter vEthernet (internal-virtual):

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #2
   Physical Address. . . . . . . . . : 00-15-5D-98-52-17
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::6103:8a60:bac8:a227%21(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.137.1(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :
   DHCPv6 IAID . . . . . . . . . . . : 553653597
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-20-96-12-25-00-25-90-7F-E1-D4
   DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
                                       fec0:0:0:ffff::2%1
                                       fec0:0:0:ffff::3%1
   NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter vEthernet (external-virtual):

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #3
   Physical Address. . . . . . . . . : 00-25-90-7F-E1-D4
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   IPv4 Address. . . . . . . . . . . : xxx.xxx.xxx.82(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.248
   Default Gateway . . . . . . . . . : xxx.xxx.xxx.81
   DHCPv6 IAID . . . . . . . . . . . : 352331152
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-20-96-12-25-00-25-90-7F-E1-D4
   DNS Servers . . . . . . . . . . . : 8.8.8.8
                                       8.8.4.4
   NetBIOS over Tcpip. . . . . . . . : Enabled

Tunnel adapter isatap.{C514C027-2ED3-45AC-AD93-6C8E57840B1C}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.{961E58C7-A1D1-4CC3-B9B5-303DD4CFD1EC}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter #3
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes`

```

@dineshgovindasamy
Copy link

https://github.com/Microsoft/Virtualization-Documentation/tree/master/windows-server-container-tools/CleanupContainerHostNetworking
Please run this script with the following option.
PS C:> .\CleanupContainerHostNetworking.ps1 -ForceCleanup

Reboot the system

then do ipconfig /all

@mechanic22
Copy link
Author

PS D:\> .\CleanupContainerHostNetworking.ps1 -ForceCleanup
WARNING: Waiting for service 'docker (Docker)' to start...
WARNING: Waiting for service 'docker (Docker)' to start...
WARNING: Waiting for service 'docker (Docker)' to start...
WARNING: Waiting for service 'docker (Docker)' to start...
WARNING: Waiting for service 'docker (Docker)' to start...
WARNING: Waiting for service 'docker (Docker)' to start...
WARNING: Waiting for service 'docker (Docker)' to start...
WARNING: This script is not compatible with overlay networking. Before continuing, ensure all overlay networks are removed from your system.
Press Enter to continue (or Ctrl+C to stop script) ...:

Complete!!!
PS D:\> ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : WIN-OQAR0BRHIJ5
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Ethernet 2:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Intel(R) 82579LM Gigabit Network Connection
   Physical Address. . . . . . . . . : 00-25-90-7F-E1-D5
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Ethernet adapter vEthernet (HNS Internal NIC):

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter
   Physical Address. . . . . . . . . : 00-15-5D-28-69-52
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Ethernet adapter vEthernet (internal-virtual):

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #2
   Physical Address. . . . . . . . . : 00-15-5D-98-52-17
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::6103:8a60:bac8:a227%21(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.137.1(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :
   DHCPv6 IAID . . . . . . . . . . . : 553653597
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-20-96-12-25-00-25-90-7F-E1-D4
   DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
                                       fec0:0:0:ffff::2%1
                                       fec0:0:0:ffff::3%1
   NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter vEthernet (external-virtual):

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #3
   Physical Address. . . . . . . . . : 00-25-90-7F-E1-D4
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   IPv4 Address. . . . . . . . . . . : xxx.xxx.xxx.82(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.248
   Default Gateway . . . . . . . . . : xxx.xxx.xxx.81
   DHCPv6 IAID . . . . . . . . . . . : 352331152
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-20-96-12-25-00-25-90-7F-E1-D4
   DNS Servers . . . . . . . . . . . : 8.8.8.8
                                       8.8.4.4
   NetBIOS over Tcpip. . . . . . . . : Enabled

Tunnel adapter isatap.{C514C027-2ED3-45AC-AD93-6C8E57840B1C}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.{961E58C7-A1D1-4CC3-B9B5-303DD4CFD1EC}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter #3
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

@kallie-b
Copy link

@johannes-brunner -- That makes sense. I'll troubleshoot this a bit myself, and get back to you as soon as possible.

@EM1L
Copy link

EM1L commented Jun 30, 2017

@kallie-b
I am experiencing "ERROR: HNS failed with error : The parameter is incorrect." on two different fresh installs of Windows Server 2016.

I first got the error by running docker-compose up -d against the following docker-compose file:

version: '2.1'

services:
    teamcity:
        image: jetbrains/teamcity-server:latest
        volumes:
            - ./data/server/datadir:/data/teamcity_server/datadir
            - ./data/server/logs:/opt/teamcity/logs
        ports:
            - 8111:8111
    teamcity-agent:
        image: jetbrains/teamcity-agent:latest
        volumes:
            - ./data/agent:/data/teamcity_agent/conf
        environment:
            SERVER_URL: http://teamcity:8111

However the interesting twist is that when I tried running docker create network -d overlay myoverlay it appears the Docker network image is missing
PS C:> docker create network -d overlay myoverlay Unable to find image 'network:latest' locally Error response from daemon: repository network not found: does not exist or no pull access

Next I ran docker in debug mode and tried again it appears Docker can not fetch the network image it needs from the repository:

PS C:\run\teamcity> dockerd.exe -D
time="2017-06-30T09:06:32.330052500Z" level=debug msg="Listener created for HTTP on npipe (//./pipe/docker_engine)"
time="2017-06-30T09:06:32.378052300Z" level=info msg="Windows default isolation mode: process"
time="2017-06-30T09:06:32.379053400Z" level=debug msg="Using default logging driver json-file"
time="2017-06-30T09:06:32.380052700Z" level=debug msg="WindowsGraphDriver InitFilter at C:\\ProgramData\\docker\\windows
filter"
time="2017-06-30T09:06:32.381053000Z" level=info msg="[graphdriver] using prior storage driver: windowsfilter"
time="2017-06-30T09:06:32.381053000Z" level=debug msg="Using graph driver windowsfilter"
time="2017-06-30T09:06:32.392052400Z" level=debug msg="Max Concurrent Downloads: 3"
time="2017-06-30T09:06:32.392052400Z" level=debug msg="Max Concurrent Uploads: 5"
time="2017-06-30T09:06:32.424052900Z" level=info msg="Graph migration to content-addressability took 0.00 seconds"
time="2017-06-30T09:06:32.426053000Z" level=info msg="Loading containers: start."
time="2017-06-30T09:06:32.428053200Z" level=debug msg="Loaded container 3010c995d05e074164e55856c415362970771dac8ea07b21
fbe0e4313dfea15b"
time="2017-06-30T09:06:32.429053600Z" level=debug msg="Loaded container 90fb09e9d3ab0f3449f169e98f37be7f623a230e263ec009
ac8f66682b9d5542"
time="2017-06-30T09:06:32.431053300Z" level=debug msg="Loaded container 9c7ccdd9fa13fb59e2a05b764e75d44f9bfc1b248e702138
6c25145fe6d43215"
time="2017-06-30T09:06:32.461053300Z" level=debug msg="Option Experimental: false"
time="2017-06-30T09:06:32.463053300Z" level=debug msg="Option DefaultDriver: nat"
time="2017-06-30T09:06:32.463053300Z" level=debug msg="Option DefaultNetwork: nat"
time="2017-06-30T09:06:32.506053700Z" level=debug msg="Network Response : [ { \"CurrentEndpointCount\" : 0, \"ExternalIn
terfaceAddress\" : \"00-22-48-01-95-99\", \"ExternalInterfaceIndex\" : 14, \"ID\" : \"11582ae5-d7fd-4809-8241-c2914dcbd0
b1\", \"MacPools\" : [ { \"EndMacAddress\" : \"00-15-5D-3F-2F-FF\", \"StartMacAddress\" : \"00-15-5D-3F-20-00\" } ], \"M
axConcurrentEndpoints\" : 1, \"NATName\" : \"H11582ae5-d7fd-4809-8241-c2914dcbd0b1\", \"Name\" : \"nat\", \"Policies\" :
 [  ], \"Subnets\" : [ { \"AddressPrefix\" : \"172.17.112.0/20\", \"GatewayAddress\" : \"172.17.112.1\" } ], \"SwitchGui
d\" : \"2bc045d8-f5e3-46e4-adaf-423b76779c74\", \"TotalEndpoints\" : 5, \"Type\" : \"nat\", \"Version\" : 4294967297 } ]
"
time="2017-06-30T09:06:32.510053600Z" level=debug msg="Launching DNS server for network%!(EXTRA string=none)"
time="2017-06-30T09:06:32.530053900Z" level=debug msg="releasing IPv4 pools from network nat (500d740bb21ea17e970da5be1f
aabe581826d26bf2e09dfcd02e558c8304445f)"
time="2017-06-30T09:06:32.531055400Z" level=debug msg="ReleaseAddress(172.17.112.0/20, 172.17.112.1)"
time="2017-06-30T09:06:32.531055400Z" level=debug msg="ReleasePool(172.17.112.0/20)"
time="2017-06-30T09:06:32.564055300Z" level=debug msg="Allocating IPv4 pools for network nat (34b07897735ab9009f4befce31
100c939f2dd06e8b0811cfb9e1110bae178b58)"
time="2017-06-30T09:06:32.566054200Z" level=debug msg="RequestPool(LocalDefault, 172.17.112.0/20, , map[], false)"
time="2017-06-30T09:06:32.567054200Z" level=debug msg="RequestAddress(172.17.112.0/20, 172.17.112.1, map[RequestAddressT
ype:com.docker.network.gateway])"
time="2017-06-30T09:06:32.567054200Z" level=debug msg="Launching DNS server for network%!(EXTRA string=nat)"
time="2017-06-30T09:06:32.574054700Z" level=debug msg="Network Response : { \"CurrentEndpointCount\" : 0, \"ExternalInte
rfaceAddress\" : \"00-22-48-01-95-99\", \"ExternalInterfaceIndex\" : 14, \"ID\" : \"11582ae5-d7fd-4809-8241-c2914dcbd0b1
\", \"MacPools\" : [ { \"EndMacAddress\" : \"00-15-5D-3F-2F-FF\", \"StartMacAddress\" : \"00-15-5D-3F-20-00\" } ], \"Max
ConcurrentEndpoints\" : 1, \"NATName\" : \"H11582ae5-d7fd-4809-8241-c2914dcbd0b1\", \"Name\" : \"nat\", \"Policies\" : [
  ], \"Subnets\" : [ { \"AddressPrefix\" : \"172.17.112.0/20\", \"GatewayAddress\" : \"172.17.112.1\" } ], \"SwitchGuid\
" : \"2bc045d8-f5e3-46e4-adaf-423b76779c74\", \"TotalEndpoints\" : 5, \"Type\" : \"nat\", \"Version\" : 4294967297 }"
time="2017-06-30T09:06:32.576054200Z" level=debug msg="Binding a resolver on network nat gateway 172.17.112.1"
time="2017-06-30T09:06:32.577054100Z" level=debug msg="Resolver bound successfully for network nat"
time="2017-06-30T09:06:32.612053900Z" level=info msg="Loading containers: done."
time="2017-06-30T09:06:32.622054500Z" level=info msg="Daemon has completed initialization"
time="2017-06-30T09:06:32.623055300Z" level=info msg="Docker daemon" commit=3fcee33 graphdriver=windowsfilter version=17
.03.1-ee-3
time="2017-06-30T09:06:32.624054400Z" level=debug msg="Registering routers"
time="2017-06-30T09:06:32.625054900Z" level=debug msg="Registering GET, /containers/{name:.*}/checkpoints"
time="2017-06-30T09:06:32.626053600Z" level=debug msg="Registering POST, /containers/{name:.*}/checkpoints"
time="2017-06-30T09:06:32.626053600Z" level=debug msg="Registering DELETE, /containers/{name}/checkpoints/{checkpoint}"
time="2017-06-30T09:06:32.634054000Z" level=debug msg="Registering HEAD, /containers/{name:.*}/archive"
time="2017-06-30T09:06:32.634054000Z" level=debug msg="Registering GET, /containers/json"
time="2017-06-30T09:06:32.635054200Z" level=debug msg="Registering GET, /containers/{name:.*}/export"
time="2017-06-30T09:06:32.636063500Z" level=debug msg="Registering GET, /containers/{name:.*}/changes"
time="2017-06-30T09:06:32.637054900Z" level=debug msg="Registering GET, /containers/{name:.*}/json"
time="2017-06-30T09:06:32.637054900Z" level=debug msg="Registering GET, /containers/{name:.*}/top"
time="2017-06-30T09:06:32.638054000Z" level=debug msg="Registering GET, /containers/{name:.*}/logs"
time="2017-06-30T09:06:32.639054100Z" level=debug msg="Registering GET, /containers/{name:.*}/stats"
time="2017-06-30T09:06:32.640053600Z" level=debug msg="Registering GET, /containers/{name:.*}/attach/ws"
time="2017-06-30T09:06:32.641054400Z" level=debug msg="Registering GET, /exec/{id:.*}/json"
time="2017-06-30T09:06:32.641054400Z" level=debug msg="Registering GET, /containers/{name:.*}/archive"
time="2017-06-30T09:06:32.643054300Z" level=debug msg="Registering POST, /containers/create"
time="2017-06-30T09:06:32.644054200Z" level=debug msg="Registering POST, /containers/{name:.*}/kill"
time="2017-06-30T09:06:32.645058300Z" level=debug msg="Registering POST, /containers/{name:.*}/pause"
time="2017-06-30T09:06:32.645058300Z" level=debug msg="Registering POST, /containers/{name:.*}/unpause"
time="2017-06-30T09:06:32.646054000Z" level=debug msg="Registering POST, /containers/{name:.*}/restart"
time="2017-06-30T09:06:32.647054700Z" level=debug msg="Registering POST, /containers/{name:.*}/start"
time="2017-06-30T09:06:32.647054700Z" level=debug msg="Registering POST, /containers/{name:.*}/stop"
time="2017-06-30T09:06:32.648054000Z" level=debug msg="Registering POST, /containers/{name:.*}/wait"
time="2017-06-30T09:06:32.649054100Z" level=debug msg="Registering POST, /containers/{name:.*}/resize"
time="2017-06-30T09:06:32.650054500Z" level=debug msg="Registering POST, /containers/{name:.*}/attach"
time="2017-06-30T09:06:32.651054100Z" level=debug msg="Registering POST, /containers/{name:.*}/copy"
time="2017-06-30T09:06:32.651054100Z" level=debug msg="Registering POST, /containers/{name:.*}/exec"
time="2017-06-30T09:06:32.653054400Z" level=debug msg="Registering POST, /exec/{name:.*}/start"
time="2017-06-30T09:06:32.654054100Z" level=debug msg="Registering POST, /exec/{name:.*}/resize"
time="2017-06-30T09:06:32.655059900Z" level=debug msg="Registering POST, /containers/{name:.*}/rename"
time="2017-06-30T09:06:32.655059900Z" level=debug msg="Registering POST, /containers/{name:.*}/update"
time="2017-06-30T09:06:32.656056400Z" level=debug msg="Registering POST, /containers/prune"
time="2017-06-30T09:06:32.657054000Z" level=debug msg="Registering PUT, /containers/{name:.*}/archive"
time="2017-06-30T09:06:32.658053900Z" level=debug msg="Registering DELETE, /containers/{name:.*}"
time="2017-06-30T09:06:32.658053900Z" level=debug msg="Registering GET, /images/json"
time="2017-06-30T09:06:32.659054000Z" level=debug msg="Registering GET, /images/search"
time="2017-06-30T09:06:32.660060300Z" level=debug msg="Registering GET, /images/get"
time="2017-06-30T09:06:32.660060300Z" level=debug msg="Registering GET, /images/{name:.*}/get"
time="2017-06-30T09:06:32.662053600Z" level=debug msg="Registering GET, /images/{name:.*}/history"
time="2017-06-30T09:06:32.673054600Z" level=debug msg="Registering GET, /images/{name:.*}/json"
time="2017-06-30T09:06:32.674054800Z" level=debug msg="Registering POST, /commit"
time="2017-06-30T09:06:32.674054800Z" level=debug msg="Registering POST, /images/load"
time="2017-06-30T09:06:32.675054000Z" level=debug msg="Registering POST, /images/create"
time="2017-06-30T09:06:32.676054400Z" level=debug msg="Registering POST, /images/{name:.*}/push"
time="2017-06-30T09:06:32.677054500Z" level=debug msg="Registering POST, /images/{name:.*}/tag"
time="2017-06-30T09:06:32.677054500Z" level=debug msg="Registering POST, /images/prune"
time="2017-06-30T09:06:32.678054300Z" level=debug msg="Registering DELETE, /images/{name:.*}"
time="2017-06-30T09:06:32.679054400Z" level=debug msg="Registering OPTIONS, /{anyroute:.*}"
time="2017-06-30T09:06:32.680054000Z" level=debug msg="Registering GET, /_ping"
time="2017-06-30T09:06:32.680054000Z" level=debug msg="Registering GET, /events"
time="2017-06-30T09:06:32.681054300Z" level=debug msg="Registering GET, /info"
time="2017-06-30T09:06:32.682054000Z" level=debug msg="Registering GET, /version"
time="2017-06-30T09:06:32.684054000Z" level=debug msg="Registering GET, /system/df"
time="2017-06-30T09:06:32.684054000Z" level=debug msg="Registering POST, /auth"
time="2017-06-30T09:06:32.685054100Z" level=debug msg="Registering GET, /volumes"
time="2017-06-30T09:06:32.686054600Z" level=debug msg="Registering GET, /volumes/{name:.*}"
time="2017-06-30T09:06:32.686054600Z" level=debug msg="Registering POST, /volumes/create"
time="2017-06-30T09:06:32.687054300Z" level=debug msg="Registering POST, /volumes/prune"
time="2017-06-30T09:06:32.688055100Z" level=debug msg="Registering DELETE, /volumes/{name:.*}"
time="2017-06-30T09:06:32.688055100Z" level=debug msg="Registering POST, /build"
time="2017-06-30T09:06:32.689054200Z" level=debug msg="Registering POST, /swarm/init"
time="2017-06-30T09:06:32.690054900Z" level=debug msg="Registering POST, /swarm/join"
time="2017-06-30T09:06:32.690054900Z" level=debug msg="Registering POST, /swarm/leave"
time="2017-06-30T09:06:32.692054900Z" level=debug msg="Registering GET, /swarm"
time="2017-06-30T09:06:32.693055200Z" level=debug msg="Registering GET, /swarm/unlockkey"
time="2017-06-30T09:06:32.694054800Z" level=debug msg="Registering POST, /swarm/update"
time="2017-06-30T09:06:32.694054800Z" level=debug msg="Registering POST, /swarm/unlock"
time="2017-06-30T09:06:32.695054300Z" level=debug msg="Registering GET, /services"
time="2017-06-30T09:06:32.696055100Z" level=debug msg="Registering GET, /services/{id}"
time="2017-06-30T09:06:32.696055100Z" level=debug msg="Registering POST, /services/create"
time="2017-06-30T09:06:32.697054300Z" level=debug msg="Registering POST, /services/{id}/update"
time="2017-06-30T09:06:32.698054400Z" level=debug msg="Registering DELETE, /services/{id}"
time="2017-06-30T09:06:32.699054000Z" level=debug msg="Registering GET, /services/{id}/logs"
time="2017-06-30T09:06:32.699054000Z" level=debug msg="Registering GET, /nodes"
time="2017-06-30T09:06:32.700054500Z" level=debug msg="Registering GET, /nodes/{id}"
time="2017-06-30T09:06:32.708054300Z" level=debug msg="Registering DELETE, /nodes/{id}"
time="2017-06-30T09:06:32.709054600Z" level=debug msg="Registering POST, /nodes/{id}/update"
time="2017-06-30T09:06:32.710054300Z" level=debug msg="Registering GET, /tasks"
time="2017-06-30T09:06:32.711054700Z" level=debug msg="Registering GET, /tasks/{id}"
time="2017-06-30T09:06:32.712054600Z" level=debug msg="Registering GET, /secrets"
time="2017-06-30T09:06:32.712054600Z" level=debug msg="Registering POST, /secrets/create"
time="2017-06-30T09:06:32.713055100Z" level=debug msg="Registering DELETE, /secrets/{id}"
time="2017-06-30T09:06:32.714055100Z" level=debug msg="Registering GET, /secrets/{id}"
time="2017-06-30T09:06:32.715054500Z" level=debug msg="Registering POST, /secrets/{id}/update"
time="2017-06-30T09:06:32.715054500Z" level=debug msg="Registering GET, /plugins"
time="2017-06-30T09:06:32.716054600Z" level=debug msg="Registering GET, /plugins/{name:.*}/json"
time="2017-06-30T09:06:32.717054500Z" level=debug msg="Registering GET, /plugins/privileges"
time="2017-06-30T09:06:32.718054200Z" level=debug msg="Registering DELETE, /plugins/{name:.*}"
time="2017-06-30T09:06:32.718054200Z" level=debug msg="Registering POST, /plugins/{name:.*}/enable"
time="2017-06-30T09:06:32.720054900Z" level=debug msg="Registering POST, /plugins/{name:.*}/disable"
time="2017-06-30T09:06:32.721055100Z" level=debug msg="Registering POST, /plugins/pull"
time="2017-06-30T09:06:32.721055100Z" level=debug msg="Registering POST, /plugins/{name:.*}/push"
time="2017-06-30T09:06:32.722054500Z" level=debug msg="Registering POST, /plugins/{name:.*}/upgrade"
time="2017-06-30T09:06:32.723054500Z" level=debug msg="Registering POST, /plugins/{name:.*}/set"
time="2017-06-30T09:06:32.724054300Z" level=debug msg="Registering POST, /plugins/create"
time="2017-06-30T09:06:32.724054300Z" level=debug msg="Registering GET, /networks"
time="2017-06-30T09:06:32.725054500Z" level=debug msg="Registering GET, /networks/"
time="2017-06-30T09:06:32.726054900Z" level=debug msg="Registering GET, /networks/{id:.+}"
time="2017-06-30T09:06:32.727054600Z" level=debug msg="Registering POST, /networks/create"
time="2017-06-30T09:06:32.728055400Z" level=debug msg="Registering POST, /networks/{id:.*}/connect"
time="2017-06-30T09:06:32.728055400Z" level=debug msg="Registering POST, /networks/{id:.*}/disconnect"
time="2017-06-30T09:06:32.730055000Z" level=debug msg="Registering POST, /networks/prune"
time="2017-06-30T09:06:32.731054800Z" level=debug msg="Registering DELETE, /networks/{id:.*}"
time="2017-06-30T09:06:32.732054300Z" level=info msg="API listen on //./pipe/docker_engine"
time="2017-06-30T09:06:32.733054300Z" level=debug msg="Stackdump - waiting signal at Global\\docker-daemon-1168"
time="2017-06-30T09:06:32.735053400Z" level=debug msg="Config reload - waiting signal at Global\\docker-daemon-config-11
68"
time="2017-06-30T09:08:08.895891700Z" level=debug msg="Calling GET /_ping"
time="2017-06-30T09:08:08.898893400Z" level=debug msg="Calling POST /v1.27/containers/create"
time="2017-06-30T09:08:08.898893400Z" level=debug msg="form data: {\"AttachStderr\":true,\"AttachStdin\":false,\"AttachStdout\
":true,\"Cmd\":[\"-d\",\"overlay\",\"myoverlay\"],\"Domainname\":\"\",\"Entrypoint\":null,\"Env\":[],\"HostConfig\":{\"AutoRem
ove\":false,\"Binds\":null,\"BlkioDeviceReadBps\":null,\"BlkioDeviceReadIOps\":null,\"BlkioDeviceWriteBps\":null,\"BlkioDevice
WriteIOps\":null,\"BlkioWeight\":0,\"BlkioWeightDevice\":null,\"CapAdd\":null,\"CapDrop\":null,\"Cgroup\":\"\",\"CgroupParent\
":\"\",\"ConsoleSize\":[0,0],\"ContainerIDFile\":\"\",\"CpuCount\":0,\"CpuPercent\":0,\"CpuPeriod\":0,\"CpuQuota\":0,\"CpuReal
timePeriod\":0,\"CpuRealtimeRuntime\":0,\"CpuShares\":0,\"CpusetCpus\":\"\",\"CpusetMems\":\"\",\"DeviceCgroupRules\":null,\"D
evices\":[],\"DiskQuota\":0,\"Dns\":[],\"DnsOptions\":[],\"DnsSearch\":[],\"ExtraHosts\":null,\"GroupAdd\":null,\"IOMaximumBan
dwidth\":0,\"IOMaximumIOps\":0,\"IpcMode\":\"\",\"Isolation\":\"\",\"KernelMemory\":0,\"Links\":null,\"LogConfig\":{\"Config\"
:{},\"Type\":\"\"},\"Memory\":0,\"MemoryReservation\":0,\"MemorySwap\":0,\"MemorySwappiness\":-1,\"NanoCpus\":0,\"NetworkMode\
":\"default\",\"OomKillDisable\":false,\"OomScoreAdj\":0,\"PidMode\":\"\",\"PidsLimit\":0,\"PortBindings\":{},\"Privileged\":f
alse,\"PublishAllPorts\":false,\"ReadonlyRootfs\":false,\"RestartPolicy\":{\"MaximumRetryCount\":0,\"Name\":\"no\"},\"Security
Opt\":null,\"ShmSize\":0,\"UTSMode\":\"\",\"Ulimits\":null,\"UsernsMode\":\"\",\"VolumeDriver\":\"\",\"VolumesFrom\":null},\"H
ostname\":\"\",\"Image\":\"network\",\"Labels\":{},\"NetworkingConfig\":{\"EndpointsConfig\":{}},\"OnBuild\":null,\"OpenStdin\
":false,\"StdinOnce\":false,\"Tty\":false,\"User\":\"\",\"Volumes\":{},\"WorkingDir\":\"\"}"
time="2017-06-30T09:08:08.899893100Z" level=error msg="Handler for POST /v1.27/containers/create returned error: No such image
: network:latest"
time="2017-06-30T09:08:08.901893000Z" level=debug msg="Calling GET /v1.27/info"
time="2017-06-30T09:08:08.914892900Z" level=debug msg="Calling POST /v1.27/images/create?fromImage=network&tag=latest"
time="2017-06-30T09:08:08.914892900Z" level=debug msg="Trying to pull network from https://registry-1.docker.io v2"
time="2017-06-30T09:08:09.977584300Z" level=error msg="Not continuing with pull after error: errors:\ndenied: requested access
 to the resource is denied\nunauthorized: authentication required\n"
time="2017-06-30T09:08:09.978545400Z" level=info msg="Ignoring extra error returned from registry: unauthorized: authenticatio
n required"
time="2017-06-30T09:08:09.978545400Z" level=info msg="Translating \"denied: requested access to the resource is denied\" to \"
repository network not found: does not exist or no pull access\""
time="2017-06-30T09:08:09.978545400Z" level=error msg="Handler for POST /v1.27/images/create returned error: repository networ
k not found: does not exist or no pull access"

Once again here is the debug output of the network image pull:
Pull request:
PS C:> docker pull network Using default tag: latest Error response from daemon: repository network not found: does not exist or no pull access
DEBUG Log:
time="2017-06-30T09:59:53.603232200Z" level=debug msg="Calling GET /_ping" time="2017-06-30T09:59:53.608231900Z" level=debug msg="Calling GET /v1.27/info" time="2017-06-30T09:59:53.625232600Z" level=debug msg="Calling POST /v1.27/images/create?fromImage=network&tag=latest" time="2017-06-30T09:59:53.625232600Z" level=debug msg="Trying to pull network from https://registry-1.docker.io v2" time="2017-06-30T09:59:54.583836400Z" level=error msg="Not continuing with pull after error: errors:\ndenied: requested access to the resource is denied\nunauthorized: authentication required\n" time="2017-06-30T09:59:54.583836400Z" level=info msg="Ignoring extra error returned from registry: unauthorized: authenticatio n required" time="2017-06-30T09:59:54.583836400Z" level=info msg="Translating \"denied: requested access to the resource is denied\" to \" repository network not found: does not exist or no pull access\"" time="2017-06-30T09:59:54.583836400Z" level=error msg="Handler for POST /v1.27/images/create returned error: repository networ k not found: does not exist or no pull access"

I have checked if there is any block on outgoing traffic but I don't thik this is an issue - What is the meaning of: unauthorized: authentication required in the debug output above - How do I troubleshoot this further?

Many Thanks for your help!

@friism
Copy link

friism commented Jun 30, 2017

@EM1L the correct command to create a network is docker network create -d overlay myoverlay

@EM1L
Copy link

EM1L commented Jun 30, 2017

@friism - Thanks!

Here I go again - this time I nuked the Azure VM and started fresh, because there were so many things i tried that eventually I lost my confidence in the docker install - here is the output - the error seem to be persistent:

PS C:\> docker network create -d overlay myoverlay
Error response from daemon: HNS failed with error : The parameter is incorrect.

Docker version:

PS C:\> docker version
Client:
 Version:      17.03.1-ee-3
 API version:  1.27
 Go version:   go1.7.5
 Git commit:   3fcee33
 Built:        Thu Mar 30 19:31:22 2017
 OS/Arch:      windows/amd64

Server:
 Version:      17.03.1-ee-3
 API version:  1.27 (minimum version 1.24)
 Go version:   go1.7.5
 Git commit:   3fcee33
 Built:        Thu Mar 30 19:31:22 2017
 OS/Arch:      windows/amd64
 Experimental: false

Docker info:

PS C:\> docker info
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 2
Server Version: 17.03.1-ee-3
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.1198.amd64fre.rs1_release_sec.170427-1353)
Operating System: Windows Server 2016 Datacenter
OSType: windows
Architecture: x86_64
CPUs: 1
Total Memory: 3.5 GiB
Name: RACloudTeamCity
ID: L53K:RYYY:342Y:D6NQ:XPIW:C6UR:C52G:XEI3:J54B:35JH:P6TR:67QI
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

Docker networks & host ip config:

PS C:\> docker network ls
NETWORK ID          NAME                DRIVER              SCOPE
6bb09f4e8f5f        nat                 nat                 local
3ce4fde004aa        none                null                local
PS C:\> ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : RACloudTeamCity
   Primary Dns Suffix  . . . . . . . : RACloud.Net
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : RACloud.Net
                                       reddog.microsoft.com

Ethernet adapter Ethernet 3:

   Connection-specific DNS Suffix  . : reddog.microsoft.com
   Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter #3
   Physical Address. . . . . . . . . : 00-22-48-01-5D-69
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::4ae:c5:165d:9fc9%5(Preferred)
   IPv4 Address. . . . . . . . . . . : 10.10.224.23(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Friday, June 30, 2017 3:28:09 PM
   Lease Expires . . . . . . . . . . : Monday, August 6, 2153 10:05:29 PM
   Default Gateway . . . . . . . . . : 10.10.224.1
   DHCP Server . . . . . . . . . . . : 168.63.129.16
   DHCPv6 IAID . . . . . . . . . . . : 268444232
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-20-E7-90-30-00-15-5D-0A-13-2B
   DNS Servers . . . . . . . . . . . : 10.10.224.4
   NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter vEthernet (HNS Internal NIC):

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter
   Physical Address. . . . . . . . . : 00-15-5D-44-F0-7E
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::b490:1d1a:59c0:d4df%3(Preferred)
   IPv4 Address. . . . . . . . . . . : 172.28.0.1(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.240.0
   Default Gateway . . . . . . . . . :
   DHCPv6 IAID . . . . . . . . . . . : 369104221
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-20-E7-90-30-00-15-5D-0A-13-2B
   DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
                                       fec0:0:0:ffff::2%1
                                       fec0:0:0:ffff::3%1
   NetBIOS over Tcpip. . . . . . . . : Enabled

Tunnel adapter isatap.{16F2032B-EF6B-463D-AE1E-9F240949005B}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.reddog.microsoft.com:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . : reddog.microsoft.com
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

I am at a dead end since I explored every option to get to the bottom of this. At present I am transcribing my powershell session to have a good trail. Let me know what else I can try next?

@kallie-b
Copy link

@EM1L -- Before you can create an overlay network, your host needs to be running in swarm mode. Initialize your host as a swarm manager with this command:

docker swarm init --advertise-addr=<HOSTIPADDRESS> --listen-addr <HOSTIPADDRESS>:2377

Then try creating the overlay network:

docker network create --driver=overlay <NETWORKNAME>

Our docs on this have more explanation:
https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/swarm-mode#initializing-a-swarm-cluster

@EM1L
Copy link

EM1L commented Jun 30, 2017

@kallie-b - you are right I had no idea about the swarm mode - thanks.
I tried to create overlay network when I read this thread as it yields the same error I get: "ERROR: HNS failed with error : The parameter is incorrect."
I get the error when I try to run docker-compose on the following file:

version: '2.1'

services:
    teamcity:
        image: jetbrains/teamcity-server:latest
        volumes:
            - ./data/server/datadir:/data/teamcity_server/datadir
            - ./data/server/logs:/opt/teamcity/logs
        ports:
            - 8111:8111
    teamcity-agent:
        image: jetbrains/teamcity-agent:latest
        volumes:
            - ./data/agent:/data/teamcity_agent/conf
        environment:
            SERVER_URL: http://teamcity:8111

It appears the network creation fails... Please help!

@kallie-b
Copy link

kallie-b commented Jul 4, 2017

@EM1L

Assuming you executed the commands to initialize your swarm and create an overlay network exactly as I specified above, this should have worked. So I suspect you have something blocking overlay network creation on your system.

Can you try running ipconfig /all and docker network ls, and sharing the output? One thing that could be happening here, is you may have an existing transparent network on your system that's blocking overlay network creation. (More info on this in our Tips & Insights section of our swarm mode doc: https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/swarm-mode#tips--insights)

@EM1L
Copy link

EM1L commented Jul 10, 2017

Actually I am not trying to create overlay network but simply running docker compose file:

version: '2.1'

services:
    teamcity:
        image: jetbrains/teamcity-server:10.0.1
        volumes:
            - ./data/server/datadir:/data/teamcity_server/datadir
            - ./data/server/logs:/opt/teamcity/logs
        ports:
            - 8111:8111
    teamcity-agent:
        image: jetbrains/teamcity-agent:10.0.1
        volumes:
            - ./data/agent:/data/teamcity_agent/conf
        environment:
            SERVER_URL: http://teamcity:8111

the output I get:

PS C:\temp\teamcity> docker-compose --verbose up -d
compose.config.config.find: Using configuration files: .\docker-compose.yml
docker.auth.find_config_file: Trying paths: ['C:\\Users\\Administrator\\.docker\\config.json', 'C:\\Users\\Administrator
\\.dockercfg']
docker.auth.find_config_file: Found file at path: C:\Users\Administrator\.docker\config.json
docker.auth.load_config: Found 'auths' section
docker.auth.parse_auth: Found entry (registry=u'https://index.docker.io/v1/', username=u'dockerfordevops')
compose.cli.command.get_client: docker-compose version 1.14.0, build c7bdf9e3
docker-py version: 2.3.0
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.0.2j  26 Sep 2016
compose.cli.command.get_client: Docker base_url: http+docker://localnpipe
compose.cli.command.get_client: Docker version: KernelVersion=10.0 14393 (14393.1358.amd64fre.rs1_release.170602-2252),
Arch=amd64, BuildTime=2017-03-30T19:31:22.954362671+00:00, ApiVersion=1.27, Version=17.03.1-ee-3, MinAPIVersion=1.24, Gi
tCommit=3fcee33, Os=windows, GoVersion=go1.7.5
compose.cli.verbose_proxy.proxy_callable: docker info <- ()
compose.cli.verbose_proxy.proxy_callable: docker info -> {u'Architecture': u'x86_64',
 u'BridgeNfIp6tables': True,
 u'BridgeNfIptables': True,
 u'CPUSet': False,
 u'CPUShares': False,
 u'CgroupDriver': u'',
 u'ClusterAdvertise': u'',
 u'ClusterStore': u'',
 u'ContainerdCommit': {u'Expected': u'', u'ID': u''},
 u'Containers': 0,
...
compose.cli.verbose_proxy.proxy_callable: docker inspect_network <- (u'teamcity_default')
compose.network.ensure: Creating network "teamcity_default" with the default driver
compose.cli.verbose_proxy.proxy_callable: docker create_network <- (name=u'teamcity_default', enable_ipv6=False, ipam=No
ne, labels={u'com.docker.compose.project': u'teamcity', u'com.docker.compose.network': u'default'}, driver=None, attacha
ble=True, internal=False, options=None)
ERROR: compose.cli.errors.log_api_error: HNS failed with error : The parameter is incorrect.

docker networks & ip config:

PS C:\temp\teamcity> docker network ls
NETWORK ID          NAME                DRIVER              SCOPE
d1a036b99d9c        nat                 nat                 local
7b2c22261da0        none                null                local

PS C:\temp\teamcity> ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : WIN-B1NT13FEHB4
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : localdomain

Ethernet adapter vEthernet (HNS Internal NIC) 2:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #2
   Physical Address. . . . . . . . . : 00-15-5D-D7-16-51
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::e91d:34ca:ecb0:1ba7%14(Preferre
   IPv4 Address. . . . . . . . . . . : 172.20.192.1(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.240.0
   Default Gateway . . . . . . . . . :
   DHCPv6 IAID . . . . . . . . . . . : 234886493
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-20-E4-9E-20-00-0C-29-1E-C
   DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
                                       fec0:0:0:ffff::2%1
                                       fec0:0:0:ffff::3%1
   NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter Ethernet0:

   Connection-specific DNS Suffix  . : localdomain
   Description . . . . . . . . . . . : Intel(R) 82574L Gigabit Network Conne
   Physical Address. . . . . . . . . : 00-0C-29-1E-C0-F0
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::ec4a:146:d404:d71e%3(Preferred)
   IPv4 Address. . . . . . . . . . . : 172.16.139.130(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : 10 July 2017 20:11:57
   Lease Expires . . . . . . . . . . : 10 July 2017 20:56:57
   Default Gateway . . . . . . . . . : 172.16.139.2
   DHCP Server . . . . . . . . . . . : 172.16.139.254
   DHCPv6 IAID . . . . . . . . . . . : 50334761
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-20-E4-9E-20-00-0C-29-1E-C
   DNS Servers . . . . . . . . . . . : 172.16.139.2
   Primary WINS Server . . . . . . . : 172.16.139.2
   NetBIOS over Tcpip. . . . . . . . : Enabled

Tunnel adapter isatap.localdomain:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . : localdomain
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Tunnel adapter Teredo Tunneling Pseudo-Interface:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.{6FDE467B-4E68-41BF-961B-A78A07467D3A}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

@artisticcheese
Copy link

+1 Having the same issue. Already run cleanup script with -Cleanup -ForceDeleteAllSwitches. Error reported from node when launching container is

starting container failed: failed to create endpoint webredirect_webredirect.m9q91ma10y241r7a4879afqm9.554zcqmts15oh3nbxecy94wz2 on network webredirect_default: HNS failed with error : Element not found.

Only one node out of 3 experiencing this issue. I can see the difference is that on this node Switch named Layered_Ethernet0 is not being created when node joins the swarm. Only nat switch exists and only 2 NICs appear in Windows (NIC with name (HNStransparent) is missing). Rebooted computer, cleaned up HNS, did it all but this node refuses to launch containers in swarm mode.

@olljanat
Copy link

I found reason to "The parameter is incorrect" error on overlay network creating. You can see my troubleshooting log on here: moby/moby#32935 (comment)

I also just created issue to libnetwork project to provide better validation to these: moby/libnetwork#1843

@friism
Copy link

friism commented Jul 17, 2017

cc @kallie-b @dineshgovindasamy

@artisticcheese
Copy link

In the mean time, I installed July patch on Server2 and rebooted and now it's broken as well with the same error as well. So swarm of 3 nodes now have 2 nodes broken with the same error and seems to me the same symptomps (missing transparent NIC, missing external switch). Run all clean up script on Server2 with no avail.

@kallie-b
Copy link

@artisticcheese Will you provide the output of ipconfig /all and docker network ls on your broken systems?

@artisticcheese
Copy link

Server1 does not have docker or containers feature installed anymore but still registering NetNat. IPconfig is below

PS C:\Users\> ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : DNVAPPCNTNR1
   Primary Dns Suffix  . . . . . . . : prod.comp.com
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : prod.comp.com

Ethernet adapter Ethernet:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : vmxnet3 Ethernet Adapter
   Physical Address. . . . . . . . . : 00-50-56-AA-5A-64
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::697f:b243:2304:31aa%6(Preferred)
   IPv4 Address. . . . . . . . . . . : 10.44.129.133(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 10.44.129.252
   DHCPv6 IAID . . . . . . . . . . . : 50352214
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-20-8A-D0-23-00-50-56-AA-5A-64
   DNS Servers . . . . . . . . . . . : 10.44.24.21
                                       10.44.24.22
   NetBIOS over Tcpip. . . . . . . . : Enabled

Tunnel adapter isatap.{09BD488D-96FE-42FA-934D-02148D4F24C6}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Server 2 is live production swarm worker node which can not launch any containers
ipconfig

PS C:\Users\gsuvalian> ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : DNVAPPCNTNR2
   Primary Dns Suffix  . . . . . . . : prod.comp.com
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : prod.comp.com

Ethernet adapter Ethernet0:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : vmxnet3 Ethernet Adapter
   Physical Address. . . . . . . . . : 00-50-56-AA-6F-58
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::99c0:8011:2bf8:bee%4(Preferred)
   IPv4 Address. . . . . . . . . . . : 10.44.129.134(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 10.44.129.252
   DHCPv6 IAID . . . . . . . . . . . : 50352214
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-20-8A-D0-A6-00-50-56-AA-6F-58
   DNS Servers . . . . . . . . . . . : 10.44.24.21
                                       10.44.24.22
   NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter vEthernet (HNS Internal NIC) 2:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #4
   Physical Address. . . . . . . . . : 00-15-5D-13-6B-F8
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::64bb:fe5a:63f8:4442%18(Preferred)
   IPv4 Address. . . . . . . . . . . : 172.31.48.1(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.240.0
   Default Gateway . . . . . . . . . :
   DHCPv6 IAID . . . . . . . . . . . : 301995357
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-20-8A-D0-A6-00-50-56-AA-6F-58
   DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
                                       fec0:0:0:ffff::2%1
                                       fec0:0:0:ffff::3%1
   NetBIOS over Tcpip. . . . . . . . : Enabled

Tunnel adapter isatap.{3293B9E8-CAC2-478B-A0C0-77052B4FB5E0}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Tunnel adapter Reusable ISATAP Interface {5978A534-D26A-4BB3-B050-212AD99508A2}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

docker network

PS C:\Users\> docker network ls
NETWORK ID          NAME                  DRIVER              SCOPE
ktiqxjl7aw84        ingress               overlay             swarm
79a1566b635f        nat                   nat                 local
960bc0949794        none                  null                local
8vjj8qkitupy        webredirect_default   overlay             swarm

@kallie-b
Copy link

kallie-b commented Jul 17, 2017

@EM1L

According to your output it doesn't look like you have a transparent network that could be blocking network creation. Could you please run our logging script with no arguments (we're just getting info for now), zip the resulting folder of logs, and send it to us at sdn_feedback@microsoft.com?

@kallie-b
Copy link

@artisticcheese Let's take a closer look at your machines as well. Replied on other thread to ask for some machine logs.

@kallie-b
Copy link

kallie-b commented Jul 18, 2017

Follow up: Issue seems to be solved. We walked through the manual cleanup steps that should be covered by our HNS logging script. For some reason, in this case the script did not complete the steps as expected, so they had to be executed manually. I will follow up on this, as an update to the script is likely required.

Here are the manual instructions that we completed to perform a system cleanup and ultimately solve the problem:

  1. Remove all docker services and user-defined networks (so all docker networks except nat and none)
  2. Leave the swarm cluster (docker swarm leave --force)
  3. Stop the docker service (PS C:\> stop-service docker)
  4. Stop the HNS service (PS C:\> stop-service hns)
  5. In regedit, delete all of the registry keys under these paths:
  • HKLM:\SYSTEM\CurrentControlSet\Services\vmsmp\parameters\SwitchList
  • HKLM:\SYSTEM\CurrentControlSet\Services\vmsmp\parameters\NicList
  1. Run get-containernetwork | remove-containernetwork
  2. Delete all VMSwitches on your host
  • Do PS C:\> get-VMSwitch
  • For each switch listed, run PS C:\> remove-vmswitch <SWITCH NAME> (e.g. remove-vmswitch nat)
    NOTE: If you have Hyper-V VMs on your host, this could take them offline. You’ll have to reconfigure them after this cleanup—let me know if you need further guidance on this.
  1. Now go to Device Manager, and disable then remove all network adapters that are “Hyper-V Virtual Ethernet…” adapters
  2. Delete your HNS.data file
  • C:\ProgramData\Microsoft\Windows\HNS\HNS.data
  1. Delete the C:\ProgramData\docker folder
  • C:\ProgramData\docker
  1. Reboot machine
  • Docker and HNS should reconfigure network components from scratch, which should resolve issue.

@baki32
Copy link

baki32 commented Oct 6, 2017

Hi guys,
I was fighting this for last 3 days, and after combining multiple sources I've managed to find a way to run my container with exiting network.

executed

image

Since I wanted to use nat I've added this to docker-compose file
image

After this my container finally executed.
Hope this helps somebody.

It's just an workaround -> when I try docker network create I get
image

@jmeijrink
Copy link

I got a similar issue, when starting a container it says that it could not create the endpoint as the object already existed. And trying to create a network gave plug-in not found.

This was on Windows 10 1709.

After Stopping the services (hns and docker), deleting hns.data, starting the services again. And then performing the .\CleanupContainerHostNetworking.ps1 -Cleanup -ForceDeleteAllSwitches . Solved it for me.

Thanks!

@jramreddy
Copy link

Problem : Error response from daemon: HNS failed with error : The parameter is incorrect.

Solution:

PS C:\Users\Administrator> Remove-NetNat

Confirm
Are you sure you want to perform this action?
Performing operation Delete on Target Hbce9e309-408b-4657-8952-3a8bc8014616 PolicyStore Local
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): A
PS C:\Users\Administrator> docker network create testnetwork -d nat
87b944816a9a485a25149876fd4b04fc2d1a69a7b5de865fc7eddf271916b7e6
PS C:\Users\Administrator> docker network ls
NETWORK ID NAME DRIVER SCOPE
56996ecb7c6b nat nat local
ff2ab07fe2ff none null local
87b944816a9a testnetwork nat local
5413fd169274 vmxnet3 Ethernet Adapter - Virtual Switch transparent local

@farlop
Copy link

farlop commented Mar 21, 2018

.\CleanupContainerHostNetworking.ps1 -Cleanup -ForceDeleteAllSwitches solved my problems with windows containers being unable to access the network (dns problems). Thank you so much!!

@rn
Copy link
Contributor

rn commented May 3, 2018

I'm closing this issue as it has become a bit of collect all windows container networking issue and it looks like the original issue was solved as well.

We no longer support Docker for Windows (the application) on Windows Server:

@dhartisutariya
Copy link

@EM1L -- Before you can create an overlay network, your host needs to be running in swarm mode. Initialize your host as a swarm manager with this command:

docker swarm init --advertise-addr=<HOSTIPADDRESS> --listen-addr <HOSTIPADDRESS>:2377

Then try creating the overlay network:

docker network create --driver=overlay <NETWORKNAME>

Our docs on this have more explanation:
https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/swarm-mode#initializing-a-swarm-cluster

working fine

@tiger5226
Copy link

Delete the C:\ProgramData\docker folder
C:\ProgramData\docker

This last piece of advice is basically "reset to factory settings"....

@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 Jun 22, 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