zoukankan      html  css  js  c++  java
  • centos7.4 yum安装包出现网络不可达跟Recv failure: Connection reset by peer" 这个问题

    [root@controller ~]# yum repolist
    已加载插件:fastestmirror
    Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
    14: curl#56 - "Recv failure: Connection reset by peer"
    http://mirror.centos.org/centos/7/storage/x86_64/ceph-jewel/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2605:9000:401:102::2: 网络不可达"
    正在尝试其它镜像。
    http://mirror.centos.org/centos/7/storage/x86_64/ceph-jewel/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2605:9000:401:102::2: 网络不可达"
    正在尝试其它镜像。
    http://mirror.centos.org/centos/7/storage/x86_64/ceph-jewel/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2605:9000:401:102::2: 网络不可达"
    正在尝试其它镜像。
    http://mirror.centos.org/centos/7/storage/x86_64/ceph-jewel/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2605:9000:401:102::2: 网络不可达"
    正在尝试其它镜像。
    http://mirror.centos.org/centos/7/storage/x86_64/ceph-jewel/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2605:9000:401:102::2: 网络不可达"
    正在尝试其它镜像。
    http://mirror.centos.org/centos/7/storage/x86_64/ceph-jewel/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2605:9000:401:102::2: 网络不可达"
    正在尝试其它镜像。
    http://mirror.centos.org/centos/7/storage/x86_64/ceph-jewel/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2605:9000:401:102::2: 网络不可达"
    正在尝试其它镜像。
    http://mirror.centos.org/centos/7/storage/x86_64/ceph-jewel/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2605:9000:401:102::2: 网络不可达"
    正在尝试其它镜像。
    http://mirror.centos.org/centos/7/storage/x86_64/ceph-jewel/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2605:9000:401:102::2: 网络不可达"
    正在尝试其它镜像。
    ^Chttp://mirror.centos.org/centos/7/storage/x86_64/ceph-jewel/repodata/repomd.xml: [Errno 14] curl#56 - "Callback aborted"
    正在尝试其它镜像。
    ^Chttp://mirror.centos.org/centos/7/cloud/x86_64/openstack-pike/repodata/repomd.xml: [Errno 14] curl#56 - "Callback aborted"
    正在尝试其它镜像。
    ^Chttp://mirror.centos.org/centos/7/virt/x86_64/kvm-common/repodata/repomd.xml: [Errno 14] curl#56 - "Callback aborted"
    正在尝试其它镜像。
    ^CCould not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=extras&infra=stock error was
    14: curl#56 - "Callback aborted"
    ^CCould not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=updates&infra=stock error was
    14: curl#56 - "Callback aborted"
    源标识 源名称

    因为之前修改了网卡的文件,之前的网卡配置信息如下

    [root@compute1 ~]# vi /etc/sysconfig/network-scripts/ifcfg-enp0s3

    TYPE=Ethernet
    BOOTPROTO=static
    DEFROUTE=yes
    NAME=enp0s3
    UUID=28bff50c-ed5e-403d-9954-34021967359e
    DEVICE=enp0s3
    ONBOOT=yes
    IPADDR=192.168.1.100
    PREFIX=24
    GATEWAY=192.168.1.1

    修改之后的就变成

    [root@compute1 ~]# vi /etc/sysconfig/network-scripts/ifcfg-enp0s3

    TYPE=Ethernet
    BOOTPROTO=static
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=no
    IPV6INIT=yes
    IPV6_AUTOCONF=yes
    IPV6_DEFROUTE=yes
    IPV6_FAILURE_FATAL=no
    IPV6_ADDR_GEN_MODE=stable-privacy
    NAME=enp0s3
    UUID=28bff50c-ed5e-403d-9954-34021967359e
    DEVICE=enp0s3
    ONBOOT=yes
    IPADDR=192.168.1.100
    PREFIX=24
    GATEWAY=192.168.1.1

    :wq

    yum clean all ;yum repolist  

    Recv failure: Connection reset by peer"  这个问题网上的解决办法是关掉selinux跟firewalld,但是我关掉之后还是不行,所以最后还是修改文件变好了

  • 相关阅读:
    使用webstorm来创建并且运行vue项目详细教程
    Jmeter后置处理器之Json提取器
    Linux常用命令
    Linux安装Mysql
    Linux安装JDK
    redhat6.5安装yum
    Linux安装python
    Linux安装Tomcat
    搞懂Redis协议RESP
    1TB是多大?
  • 原文地址:https://www.cnblogs.com/fyy-hhzzj/p/8340392.html
Copyright © 2011-2022 走看看