harbor无法登录报错Error response from daemon: Get........223.5.5.5:53: no such host

Error response from daemon: Get "http://qq66907360.com/v2/": dial tcp: lookup qq66907360.com on 223.5.5.5:53: no such host

上面的这个报错是说 no such host找不到主机,排查如下:

1查看windows的hosts文件发现绑定正常:C:\Windows\System32\drivers\etc\hosts

2查看虚拟机的/etc/hosts文件发现文件绑定格式错乱,重修修改了一下

3修复过程如下

#1登录报错
[root@harbor ~]# docker login http://qq66907360.com
Username: admin
Password: 
Error response from daemon: Get "http://qq66907360.com/v2/": dial tcp: lookup qq66907360.com on 223.5.5.5:53: no such host
[root@harbor ~]# docker login 10.0.0.123
Username: admin
Password: 
Error response from daemon: Get "https://10.0.0.123/v2/": dial tcp 10.0.0.123:443: connect: connection refused
#2发现虚拟机hosts文件绑定错乱
[root@harbor ~]# cat /etc/hosts
127.0.0.1   localhost local
10.0.0.123  qq66907360.comhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
#3修改虚拟机配置文件
[root@harbor ~]# vim /etc/hosts
[root@harbor ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.0.0.123 qq66907360.com

#4重新登录harbor仓库成功
[root@harbor ~]# docker login http://qq66907360.com
Username: admin
Password: 
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded

 

posted @ 2022-06-24 09:22  linuxTang  阅读(3083)  评论(0编辑  收藏  举报