docker tls: oversized record received with length 20527

简介: [root@192-168-166-119 ~]# docker push 192.168.166.220:5000/centosmyregistry The push refers to a repository [192.
[root@192-168-166-119 ~]# docker push 192.168.166.220:5000/centosmyregistry
The push refers to a repository [192.168.166.220:5000/centosmyregistry] (len: 1)
unable to ping registry endpoint https://192.168.166.220:5000/v0/
v2 ping attempt failed with error: Get https://192.168.166.220:5000/v2/: tls: oversized record received with length 20527
 v1 ping attempt failed with error: Get https://192.168.166.220:5000/v1/_ping: tls: oversized record received with length 20527
[root@192-168-166-119 ~]# telnet 192.168.166.220 5000
Trying 192.168.166.220...
Connected to 192.168.166.220.
Escape character is '^]'.

出现这个问题是CA证书问题,修改/etc/sysconfig/docker文件,把INSECURE_REGISTRY='--insecure-registry'注释取消,修改成:
[root@192-168-166-119 ~]# vim /etc/sysconfig/docker 
INSECURE_REGISTRY='--insecure-registry 192.168.166.220:5000 '
192.168.166.220:5000是我的registry的地址.
记得要重启服务
[root@192-168-166-119 ~]# systemctl restart docker 
可以上传了
[root@192-168-166-119 ~]# docker push 192.168.166.220:5000/centosmyregistry
The push refers to a repository [192.168.166.220:5000/centosmyregistry] (len: 1)
bb3d629a7cbc: Pushed 
a63aae4d216f: Pushed 
6fdebd7b0eb5: Pushed 
47d44cb6f252: Pushed 
latest: digest: sha256:3fca4350643d07d50244b3f24d2b47aabf493c3f7e6c9739af84129bbc52cb5f size: 7225
可以看到仓库中已经有了刚才上传的image
[root@192-168-166-119 ~]# curl -X GET http://192.168.166.220:5000/v2/centosmyregistry/tags/list
{"name":"centosmyregistry","tags":["latest"]}

目录
相关文章
|
4月前
|
网络协议 jenkins 调度
Docker【部署 06】Swarm实践及Operation not permitted和No chain/target/match by that name问题处理
Docker【部署 06】Swarm实践及Operation not permitted和No chain/target/match by that name问题处理
123 0
Docker【部署 06】Swarm实践及Operation not permitted和No chain/target/match by that name问题处理
|
弹性计算 安全 Ubuntu
docker启动容器提示read init-p: connection reset by peer: unknown问题
docker启动容器提示read init-p: connection reset by peer: unknown问题
|
2月前
|
Kubernetes 容器
使用kubeadm部署k8s报错:The kubelet is not running或者level=error msg="Handler for POST /v1.43/images/create returned error: Head \"https://us-west2-dock
使用kubeadm部署k8s报错:The kubelet is not running或者level=error msg="Handler for POST /v1.43/images/create returned error: Head \"https://us-west2-dock
|
3月前
|
测试技术
Could not proxy command to the remote server. Original error: timeout of 240000ms exceeded 的解决办法
Could not proxy command to the remote server. Original error: timeout of 240000ms exceeded 的解决办法
126 0
|
3月前
|
Kubernetes 容器
【kubernetes】解决k8s1.28.4:"command failed" err="failed to parse kubelet flag: unknown flag: --c...
【kubernetes】解决k8s1.28.4:"command failed" err="failed to parse kubelet flag: unknown flag: --c...
244 0
|
网络协议 网络安全 Docker
Docker Swarm 解决报错Error response from daemon: rpc error: code = Unavailable desc = connection error:
本文是博主学习docker swarm遇到的问题记录,希望对大家有所帮助。
1219 0
Docker Swarm 解决报错Error response from daemon: rpc error: code = Unavailable desc = connection error:
|
10月前
|
网络协议 安全 Linux
如何修复 SSH Client_loop: send disconnect: Broken pipe Error
如何修复 SSH Client_loop: send disconnect: Broken pipe Error
1524 1
|
网络协议 jenkins 持续交付
Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker
Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker
557 0
Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker
|
网络协议 Java
filebeat:Failed to publish events caused by: write tcp 5044: write: connection reset by peer
filebeat:Failed to publish events caused by: write tcp 5044: write: connection reset by peer
324 0
filebeat:Failed to publish events caused by: write tcp 5044: write: connection reset by peer
|
Ubuntu Linux 应用服务中间件
OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "ip": executable file not found in $PATH: unknown (Docker容器没有ip addr命令:exec ip addr 报错)
OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "ip": executable file not found in $PATH: unknown (Docker容器没有ip addr命令:exec ip addr 报错)
3315 0