Windows container failed to start with error, “failed to create endpoint on network nat: HNS failed with error : Failed to create endpoint.”

后端 未结 4 1049
你的背包
你的背包 2021-01-12 06:01

I have been trying Windows Containers on windows server 2016 TP5. Suddenly I started getting error while running a container with port maping option -p 80:80

4条回答
  •  渐次进展
    2021-01-12 06:35

    I had similar error.

    $ docker --version
    Docker version 1.13.0-rc3, build 4d92237
    $ docker-compose -f .\docker-compose.windows.yml up
    Starting musicstore_db_1
    
    ERROR: for db  Cannot start service db: {"message":"failed to create endpoint musicstore_db_1 on network nat: HNS failed with error : Unspecified error"}
    ERROR: Encountered errors while bringing up the project.
    

    Static mapping removal did not work, only network removal helped:

    Get-ContainerNetwork -Name nat | Remove-ContainerNetwork
    

    Execute the command in PowerShell as administrator, then restart Docker.


    Update:

    Use CleanupContainerHostNetworking.ps1 script to resolve Docker 17 networking issues.

    .\CleanupContainerHostNetworking.ps1 -Cleanup -ForceDeleteAllSwitches
    

提交回复
热议问题