Docker 登录 harbor 出现出现 (Client.Timeout exceeded while awaiting headers)
1. 可以检查下 docker 是配置了网络代理。(web 可以登录,其他的机器可以登录 harbor 就行这台机器不能登录 这个基本上是 docker 的网络配置出现问题)
2. 检查 /etc/docker/daemon.json 是否配置了 harbor 仓库 url 地址。
3. 排除错误思路:1. login 报什么错?2. 到机器上看一下,网络是否通?3. 抓包看看
[root@DEV2-10 ~]# docker login http://ip:port/ -u用户名 -p密码
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error response from daemon: Get http://ip:port/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
[root@DEV2-10 ~]# cat /etc/docker/daemon.json
{
"insecure-registries":["10.20.21.11:8088"],
"exec-opts": ["native.cgroupdriver=systemd"],
"registry-mirrors": ["https://qqnn8qm9.mirror.aliyuncs.com"]
}
[root@DEV2-10 ~]# docker info
HTTP Proxy: http://10.20.9.10:8118/
HTTPS Proxy: http://10.20.9.10:8118/
检查下是否 docker 配置了代理,而代理是不通的,有问题的。

本文介绍了在尝试使用Docker登录Harbor时遇到`Client.Timeoutexceededwhileawaitingheaders`错误的排查步骤。首先检查Docker是否配置了网络代理,特别是当其他机器可以正常登录时,这可能是网络配置问题。其次,确认`/etc/docker/daemon.json`中是否设置了Harbor仓库URL。最后,建议检查网络连接并进行抓包分析以定位问题。在给出的示例中,发现Docker配置了HTTP代理,可能需要确保代理服务器的可达性。
645

被折叠的 条评论
为什么被折叠?



