Error response from daemon: login attempt to http://10.0.0.77:85/v2/ failed with status: 502 Bad Gat

1.问题:

[root@k8s-master ~]# docker login 10.0.0.77:85
Username: admin
Password: 
Error response from daemon: login attempt to http://10.0.0.77:85/v2/ failed with status: 502 Bad Gateway

2.原因分析并解决

原因分析:harbor服务器部分服务因宕机引起服务未重启。

# 发现部分镜像是不用重启
[root@centos7 harbor]# docker-compose up -d
harbor-log is up-to-date
harbor-db is up-to-date
harbor-portal is up-to-date
Starting redis       ... done
Starting registry    ... done
Starting registryctl ... done
harbor-core is up-to-date
nginx is up-to-date
harbor-jobservice is up-to-date

# 我害怕还是不能生效便先down 然后再up
[root@centos7 harbor]# docker-compose down
Stopping harbor-jobservice ... done
Stopping nginx             ... done
Stopping harbor-core       ... done
Stopping registry          ... done
Stopping redis             ... done
Stopping registryctl       ... done
Stopping harbor-portal     ... done
Stopping harbor-db         ... done
Stopping harbor-log        ... done
Removing harbor-jobservice ... done
Removing nginx             ... done
Removing harbor-core       ... done
Removing registry          ... done
Removing redis             ... done
Removing registryctl       ... done
Removing harbor-portal     ... done
Removing harbor-db         ... done
Removing harbor-log        ... done

[root@centos7 harbor]# docker-compose up -d
Creating network "harbor_harbor" with the default driver
Creating harbor-log ... done
Creating harbor-portal ... done
Creating redis         ... done
Creating harbor-db     ... done
Creating registryctl   ... done
Creating registry      ... done
Creating harbor-core   ... done
Creating harbor-jobservice ... done
Creating nginx             ... done


3.再次登录

[root@k8s-master ~]# docker login 10.0.0.77:85
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

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值