加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

windows-server – Windows容器无法启动时出现错误,“无法在网络

发布时间:2020-12-13 22:31:03 所属栏目:Windows 来源:网络整理
导读:我一直在 Windows Server 2016 TP5上尝试Windows容器.突然间,我在运行带端口maping选项-p 80:80的容器时开始出错 c:docker run -it -p 80:80 microsoft/iis cmddocker: Error response from daemon: failed to create endpoint sharp_brahmagupta on networ
我一直在 Windows Server 2016 TP5上尝试Windows容器.突然间,我在运行带端口maping选项-p 80:80的容器时开始出错

c:&;docker run -it -p 80:80 microsoft/iis cmd
docker: Error response from daemon: failed to create endpoint sharp_brahmagupta on network nat: HNS failed with error : Failed to create endpoint.

我确保没有其他容器正在运行,并且主机上的端口80未被任何其他服务使用.

有没有人面临同样的问题?

解决方法

搜索后,我在github上发现了 this问题.这似乎是Windows服务器TP5上的Windows容器的已知问题.

那么感谢this论坛,我找到了解决方案
您可以使用以下命令检查活动静态端口映射

C:&;powershell
PS C:&;Get-NetNatStaticMapping


StaticMappingID               : 3
NatName                       : Hda6caca4-06ec-4251-8a98-1fe0b4c5af88
Protocol                      : TCP
RemoteExternalIPAddressPrefix : 0.0.0.0/0
ExternalIPAddress             : 0.0.0.0
ExternalPort                  : 80
InternalIPAddress             : 172.31.181.4
InternalPort                  : 80
InternalRoutingDomainId       : {00000000-0000-0000-0000-000000000000}
Active                        : True

从上面的输出看来,即使容器被删除,静态端口映射也没有被删除并且仍然是活动的.

但我用下面的命令删除了它.

PS C:&; Get-NetNatStaticMapping | ? ExternalPort -eq 80 | Remove-NetNatStaticMapping

然后只需重新启动系统,错误就消失了.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读