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">
    
  • 相关阅读:
    如何创建一个基于 .NET Core 3 的 WPF 项目
    阅读源码系列
    近期计划
    Redis 源码走读(二)对象系统
    Redis 源码走读(一)事件驱动机制与命令处理
    basic paxos解析
    ThreadLocal深度解析
    MySQL InnoDB MVCC深度分析
    java泛型详解
    内存可见性,指令重排序,JIT。。。。。。从一个知乎问题谈起
  • 原文地址:https://www.cnblogs.com/netflix/p/15120874.html
Copyright © 2011-2022 走看看