windows Docker 工具箱教程 Client.Timeout 在等待标头时超出
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/46822391/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Docker Toolbox Tutorial Client.Timeout exceeded while awaiting headers
提问by Eric
I'm following the guide at https://docs.docker.com/get-started/part2/#publish-the-image
我正在遵循https://docs.docker.com/get-started/part2/#publish-the-image 上的指南
Throughout the guide I've had trouble with this error sometimes coming up and sometimes when I rerun the commands they will work.
在整个指南中,我遇到了这个错误的麻烦,有时会出现,有时当我重新运行命令时,它们会起作用。
docker push %username%/%repository%:%tag%
I will get a response of Using default tag: latest
Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
我会得到回应 Using default tag: latest
Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
I'm using Windows Home with Docker Toolbox.
我正在将 Windows Home 与 Docker Toolbox 一起使用。
Please let me know if any additional information is needed.
如果需要任何其他信息,请告诉我。
采纳答案by Eric
For anyone else who's looking I found the answer herewhich led me to here
Specifically for me these steps were helpful. In case the links break in the future.
特别是对我来说,这些步骤很有帮助。以防将来链接中断。
This worked for Windows 10 Home/Docker Toolbox
这适用于 Windows 10 Home/Docker Toolbox
- Right click on wifi icon on bottom right of the screen and open network and sharing center.
- Right click on the connection at "connections:"
- Click on Properties
- Uncheck IPv6
- Check IPv4
- Click properties
- Select radio button Use the following DNS addresses
- For preferred use 8.8.8.8
- Restart the computer and try again.
- 右击屏幕右下角的wifi图标,打开网络和共享中心。
- 右键单击“连接:”处的连接
- 点击属性
- 取消选中 IPv6
- 检查 IPv4
- 单击属性
- 选择单选按钮使用以下 DNS 地址
- 首选用途 8.8.8.8
- 重新启动计算机并重试。
回答by Serge Voloshenko
回答by Dmytro Melnychuk
回答by Kostyantyn
In case someone runs his own docker repo. I had a similar "Client.Timeout exceeded while awaiting headers" when running
如果有人运行他自己的 docker repo。运行时我有一个类似的“Client.Timeout exceeded while awaiting headers”
docker login myownrepo.com:5000
It happened to be that i had port forwarding only for port 5000, and forgotten to add for port 5001. The issue was resolved by adding port 5001 (on my router) pointing to the same docker-repo-host.
碰巧我只有端口 5000 的端口转发,而忘记添加端口 5001。通过添加指向同一个 docker-repo-host 的端口 5001(在我的路由器上)解决了这个问题。
回答by MaxA
"Client.Timeout exceeded while awaiting headers"is a symptom of several possible causes. In my case it was simply a case of the private network firewallblocking the docker client machine from accessing the registry host machine.
“等待标题时超出 Client.Timeout”是多种可能原因的症状。就我而言,这只是一个私有网络防火墙阻止 docker 客户端机器访问注册表主机的情况。
To test if that's the case (for whoever may be reading this), first try temporarilydisabling the private network firewall.
要测试是否是这种情况(对于可能正在阅读本文的人),首先尝试暂时禁用专用网络防火墙。
For instance, if the private docker registry is hosted on Windows 10:
例如,如果私有 docker 注册表托管在Windows 10 上:
1) open Windows Security
1)打开Windows安全
2) click on Firewall & network protection
2)点击防火墙和网络保护
3) ensure Private Network is "active" and click on it
3) 确保专用网络处于“活动状态”并单击它
4) under "Microsoft Defender Wall" switch OFF private firewall
4) 在“Microsoft Defender Wall”下关闭私有防火墙
If the IP is suddenly accessible then you need to re-enable the firewall on the host and configure it to allow access to the docker registry.
如果突然可以访问 IP,则需要重新启用主机上的防火墙并将其配置为允许访问 docker 注册表。