docker: read tcp 192.168.7.235:36512->54.230.212.9:443: read: connection reset by peer.

时间:2021-12-21 15:25:34

在学习rancher的时候去下载rancher/agent镜像的时候,出现报错:docker: read tcp 192.168.7.235:36512->54.230.212.9:443: read: connection reset by peer.

docker: read tcp 192.168.7.235:36512->54.230.212.9:443: read: connection reset by peer.

排查思路:1.实验使用的是Centos7,rancher官方说不支持默认的storage:devicemapper;但是centos7.3默认的stoeage driver是overlay,排除这个原因;

2.百度:虽然问题不一样,但是也有提到这一点:镜像下载的问题,磨蹭了一天,试试阿里云镜像加速器.

配置阿里云镜像加速器的办法:

1.https://dev.aliyun.com/search.html   点击这个网址

2.进行注册:docker: read tcp 192.168.7.235:36512->54.230.212.9:443: read: connection reset by peer.

3.注册好后,点击管理中心

docker: read tcp 192.168.7.235:36512->54.230.212.9:443: read: connection reset by peer.

4. 点击镜像加速器docker: read tcp 192.168.7.235:36512->54.230.212.9:443: read: connection reset by peer.

5.找到专属自己的加速器网址

docker: read tcp 192.168.7.235:36512->54.230.212.9:443: read: connection reset by peer.

6.https://help.aliyun.com/document_detail/60750.html?spm=5176.11065259.1996646101.searchclickresult.78451bd5YiusoH

按照上面的网址根据自己的操作系统进行操作

我使用的是centos7

docker: read tcp 192.168.7.235:36512->54.230.212.9:443: read: connection reset by peer.

上面的这个图片做到第3部之后

vim  /etc/systemd/system/docker.service    进行修改自己的阿里云加速器的地址

docker: read tcp 192.168.7.235:36512->54.230.212.9:443: read: connection reset by peer.

完活。