zoukankan      html  css  js  c++  java
  • k8s登录harbor报错:Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request cance

    [root@k8s-node02 ~]# docker login 192.168.180.105:1180
    Username: admin
    Password:
    Error response from daemon: Get http://192.168.180.105:1180/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

    解决方案:
    1.打开终端,su root 输入密码
    2.打开 vim /etc/docker/daemon.json(若没有自行创建)
    3.写入:

    [root@k8s-node02 ~]# cat /etc/docker/daemon.json
    {
    "exec-opts": ["native.cgroupdriver=systemd"],
    "log-driver": "json-file",
    "log-opts": {
    "max-size": "100m"
    },"insecure-registries":[
        "192.168.180.105:1180"
      ]
    }
    [root@k8s-node02 ~]#

    "insecure-registries":[
    "192.168.180.105:1180"
    ]

    4.重启一下docker:

    [root@topcheer ~]# systemctl daemon-reload  #加载配置文件
    [root@topcheer ~]# systemctl restart docker  #重启
    [root@topcheer ~]#

    成功解决

    [root@k8s-node02 ~]# docker login 192.168.180.105:1180
    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
    [root@k8s-node02 ~]# curl  http://192.168.180.105:1180
    <!doctype html>
    <html>
    
    <head>
        <meta charset="utf-8">
  • 相关阅读:
    JIRA Activity Stream连接到FishEye时路径不对
    职业分析
    Doublechecked locking解析
    Wireshark基本介绍和学习TCP三次握手
    插入排序算法
    Event.observe
    前端开发工程师如何在2013年里提升自己
    addEventListener(转)
    最好的HTML 5编码教程和参考手册分享
    XSRF 的攻击与防范
  • 原文地址:https://www.cnblogs.com/dalianpai/p/11938807.html
Copyright © 2011-2022 走看看