docker login harbor 报错解决

docker login harbor.xx.com
Error response from daemon: Get http://harbor.phc-dow.com/v2/: Get http://harbor.phc-dow.com:180/service/token?account=admin&client_id=docker&offline_token=true&service=harbor-registry: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) (Client.Timeout exceeded while awaiting headers)

架构解析:harbor.xx.com 为了以后变更方便是通过nginx 80端口反代到harbor仓库的,结果在别的服务器上login报错

检查:
docker 的安全仓库配置已配置
服务器上firewalld和selinux没有阻塞,curl可以通

通过对报错信息的自信分析,发现,login最终转到了nginx反代的真实地址,试着curl一下,发现不通,问题就出在了这边
打开端口转发

#centos7.7系统
vim /etc/sysctl.conf
net.ipv4.ip_forward = 1 #最后一行写入

sysctl -p

检测一下,发现问题解决!!

你可能感兴趣的:(docker login harbor 报错解决)