美文网首页
docker报错connection reset by peer

docker报错connection reset by peer

作者: 慕知 | 来源:发表于2021-07-16 11:01 被阅读0次

    docker安装sentry,执行./install.sh脚本报错

    报错如下

    ERROR: for web  Head https://registry-1.docker.io/v2/getsentry/sentry/manifests/21.6.3: Get https://auth.docker.io/token?scope=repository%3Agetsentry%2Fsentry%3Apull&service=registry.docker.io: read tcp 192.168.51.237:36578->3.229.227.53:443: read: connection reset by peer
    
    ERROR: for ingest-consumer  Head https://registry-1.docker.io/v2/getsentry/sentry/manifests/21.6.3: Get https://auth.docker.io/token?scope=repository%3Agetsentry%2Fsentry%3Apull&service=registry.docker.io: read tcp 192.168.51.237:54938->54.161.109.204:443: read: connection reset by peer
    
    ... ...
    ▶ Downloading and installing wal2json ...
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
      0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0curl: (6) Could not resolve host: api.github.com
    An error occurred, caught SIGERR on line 18
    
    
    

    系统日志如下:

    [root@sentry_192 onpremise]# tail -f /var/log/messages
    Jul 16 10:40:01 izuf6f9wtfmjyvokv4xjkdz-192-168-51-237 kernel: IPv6: ADDRCONF(NETDEV_CHANGE): veth48ca69e: link becomes ready
    Jul 16 10:40:01 izuf6f9wtfmjyvokv4xjkdz-192-168-51-237 kernel: docker0: port 1(veth48ca69e) entered blocking state
    Jul 16 10:40:01 izuf6f9wtfmjyvokv4xjkdz-192-168-51-237 kernel: docker0: port 1(veth48ca69e) entered forwarding state
    Jul 16 10:40:03 izuf6f9wtfmjyvokv4xjkdz-192-168-51-237 dockerd: time="2021-07-16T10:40:03.680510367+08:00" level=info msg="ignoring event" container=a4bb62fdfcaf7c42f216e8ef0e87cb5d8da00db665d10b39202b19ac4201d309 module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
    Jul 16 10:40:03 izuf6f9wtfmjyvokv4xjkdz-192-168-51-237 containerd: time="2021-07-16T10:40:03.680544906+08:00" level=info msg="shim disconnected" id=a4bb62fdfcaf7c42f216e8ef0e87cb5d8da00db665d10b39202b19ac4201d309
    Jul 16 10:40:03 izuf6f9wtfmjyvokv4xjkdz-192-168-51-237 containerd: time="2021-07-16T10:40:03.680640609+08:00" level=error msg="copy shim log" error="read /proc/self/fd/10: file already closed"
    Jul 16 10:40:03 izuf6f9wtfmjyvokv4xjkdz-192-168-51-237 kernel: docker0: port 1(veth48ca69e) entered disabled state
    Jul 16 10:40:03 izuf6f9wtfmjyvokv4xjkdz-192-168-51-237 kernel: docker0: port 1(veth48ca69e) entered disabled state
    Jul 16 10:40:03 izuf6f9wtfmjyvokv4xjkdz-192-168-51-237 kernel: device veth48ca69e left promiscuous mode
    Jul 16 10:40:03 izuf6f9wtfmjyvokv4xjkdz-192-168-51-237 kernel: docker0: port 1(veth48ca69e) entered disabled state
    
    
    

    解决方案:

    #升级docker版本
    yum remove docker docker-engine docker-common \
    docker-client docker-client-latest docker-latest docker-latest-logrotate \
    docker-logrotate docker-selinux docker-engine-selinux  -y
    yum install yum-utils lvm2 device-mapper-persistent-data -y
    yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
    yum-config-manager --disable docker-ce-edge docker-ce-test
    yum install docker-ce.x86_64 -y
    yum update containerd.io -y
    
    
    #升级内核版本
    yum update kernel.x86_64 -y
    

    PS:

    也有网上说修改
    /etc/docker/daemon.json为:
    {
      "exec-opts": ["native.cgroupdriver=systemd"]
    }
    
    但是本机没有找到该文件,只有/etc/docker/key.json
    如果要用该方案,重启docker
    执行docker info|grep Cgroup
    结果如果为systemd就可以了(默认是cgroupfs)
    
    

    相关文章

      网友评论

          本文标题:docker报错connection reset by peer

          本文链接:https://www.haomeiwen.com/subject/bcovpltx.html