Yum could not retrive mirrorlist but dns is workingf properly...

General support questions
Post Reply
Posts: 1
Joined: 2020/05/29 09:39:54

Yum could not retrive mirrorlist but dns is workingf properly...

Post by romanensis » 2020/05/29 09:52:24

Hello kinda have this error with yum update or install or something

Code: Select all

# yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_6                                                                                                     4&repo=os&infra=stock error was
14: curl#7 - "Failed connect to mirrorlist.centos.org:80; Operation now in progr                                                                                                     ess"

 One of the configured repositories failed (Unknown),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=<repoid> ...

     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable <repoid>
            subscription-manager repos --disable=<repoid>

     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice

            yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

Cannot find a valid baseurl for repo: base/7/x86_64
most answers in google telling about dns
but ping working fine external connect to ssh also

so ping like -

Code: Select all

# ping mirrorlist.centos.org
PING mirrorlist.centos.org ( 56(84) bytes of data.
64 bytes from 108-43-236-85.rev.customer-net.de ( icmp_seq=1 ttl=54 time=48.4 ms
64 bytes from 108-43-236-85.rev.customer-net.de ( icmp_seq=2 ttl=54 time=49.5 ms
also curl give something like -

Code: Select all

# curl -v "http://mirrorlist.centos.org/?release=7&arch=x86_6"
* About to connect() to mirrorlist.centos.org port 80 (#0)
*   Trying
its clean install of minimal version

Code: Select all

# rpm --query centos-release
so.. yum clear all and uncommentinbg #baseurl dnst change anything.

User avatar
Forum Moderator
Posts: 29457
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Yum could not retrive mirrorlist but dns is workingf properly...

Post by TrevorH » 2020/05/29 10:27:09

Looks like you have connection problems. Since you can resolve the name and you can ping the site, it looks to me like you are behind a firewall where outbound connections to port 80 do not work. Perhaps your company uses a web proxy that you need to tell yum about via a proxy= line in yum.conf?
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Posts: 12
Joined: 2020/05/27 09:44:12

Re: Yum could not retrive mirrorlist but dns is workingf properly...

Post by mayankdhw2020 » 2020/06/04 17:35:07

Check for the option enable/enabled=1 under /etc/yum.repos.d/REPONAME.repo. If the status is enable=0 then make sure to change enable=1 for each list of repos under this configuration file. Once done, clear the cache by hitting "yum clean all" and then check "yum check-update" to verify. Hope this will fix the issue. Good luck.

Post Reply

Return to “CentOS 7 - General Support”