Ошибка no more mirrors to try

Environment

  • Red Hat Enterprise Linux
  • Red Hat Customer Portal
  • Red Hat Subscription Management (RHSM)
  • Red Hat Satellite

Issue

  • yum update fails with the error : [Errno 256] No more mirrors to try

Resolution

  • Check the network connectivity. If IP based Firewall is being used then whitelist the IPs that are mentioned in Public CIDR Lists for Red Hat (IP Addresses for cdn.redhat.com) for access to the content delivery network (CDN).

  • Check what files are present under /etc/yum.repos.d directory by:-

    # ll /etc/yum.repos.d
    
  • If the system is registered with Red Hat Subscription Manager (RHSM) via subscription-manager, rhel-source.repo and redhat.repo are present.

  • If any local repositories or any other media repositories are present, remove them by:-

    # rm -rf /etc/yum.repos.d/<local or other repository name>   
    
  • Remove the old yum cache from the system by running the following commands:

    # rm -fr /var/cache/yum/*
    # yum clean all
    
  • Check if the valid repositories are getting listed by:-

    # yum repolist
    
  • If the previous solutions does not work, try reenabling each repository one by one with the following:-

    # REPOLIST=`subscription-manager repos --list-enabled | grep "Repo ID" | awk '{print $3}'`
    # subscription-manager repos --disable="*"
    # rm -fr /var/cache/yum/*
    # yum clean all
    # for i in ${REPOLIST}; do subscription-manager repos --enable=$i ; yum repolist; done
    

Root Cause

  • Possible reasons for this issue:
    • Corrupted yum cache.
    • Inaccessibility of a repository URL from the system due to network-related issues.
    • Presence of customized or other media repositories.
    • Outdated whitelist when using IP-based Firewall configuration to access Red Hat’s Content Delivery Network (CDN).

Diagnostic Steps

  • yum update fails with any of the below errors:-

    Error Downloading Packages:
    InstallMedia: [Errno 256] No more mirrors to try.
    
    Error Downloading Packages:
    ftp-0.17-35.el5.x86_64:failure:ftp-0.17-35.el5.x86_64.rpm from Red5repo55:[Errno 256] No more mirrors to try.   [[6]]" (code -1) Packages Scheduled
    
    Downloading Packages:
    https://cdn.redhat.com/content/dist/rhel/server/6/6Server/x86_64/supplementary/os/Packages/java-1.6.0-ibm-1.6.0.15.0-1jpp.1.el6_4.x86_64.rpm: [Errno 14]   PYCURL ERROR 22 - "The requested URL returned an error: 404 Not Found"
    Trying other mirrors.
    Error Downloading Packages:
      1:java-1.6.0-ibm-1.6.0.15.0-1jpp.1.el6_4.x86_64: failure: Packages/java-1.6.0-ibm-1.6.0.15.0-1jpp.1.el6_4.x86_64.rpm from rhel-6-server-supplementary- rpms: [Errno 256] No more mirrors to try.
    
  • On Satellite Server it fails with this error as per /var/log/messages

    Jul 24 12:12:53 sat.example.com pulp: requests.packages.urllib3.connectionpool:INFO: Starting new HTTPS connection (1): cdn.redhat.com Jul 24 12:12:53 sat.example.com pulp: nectar.downloaders.threaded:INFO: Download failed:
    
  • Check the accessibility of the repository URL in the system/network.

    # ping URL
    
  • Check the repositories under /etc/yum.repos.d

    # ll /etc/yum.repos.d
    


  • Product(s)

  • Red Hat Subscription Management
  • Red Hat Satellite
  • Red Hat Enterprise Linux
  • Red Hat Customer Portal


  • Component

  • yum


  • Category

  • Troubleshoot


  • Tags

  • customer_portal
  • rhel
  • rhn
  • rhn_classic
  • rhsm
  • satellite
  • subscription_management
  • yum

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

“[Errno 256] No More Mirrors to Try” is a common error message while installing packages or running yum-install. It means that yum could not contact any of the configured mirrors and none of them had the requested package. This error can be fixed by increasing the maximum number of mirrors yum tries to contact and ensuring that yum can reach the configured mirrors. Here is how:

By default, yum will try to contact only three mirrors. To increase the total number of mirrors that yum can contact, you can modify the maxmirrors directive in the “yum.conf” file located in /etc/yum.conf.

vi /etc/yum.conf 

Locate the maxmirrors directive and change the default value 3 to the desired value. Save and exit.

Ensure yum can reach the configured mirrors

The next step is to ensure that the configured mirrors can be reached. This can be done by using the command yum repolist to view the configured mirrors in the yum repository.

yum repolist

This will display the configured repositories. It will also show the URLs of the mirrors if the settings are correct. If the URLs are not correct or are unreachable, make sure to configure the correct mirror URLs.

Frequently Asked Questions

What is the [Errno 256] No More Mirrors to Try error?

The “[Errno 256] No More Mirrors to Try” error occurs when yum cannot contact any of the configured mirrors and none of them have the requested package.

How do I fix this error?

This error can be fixed by increasing the maximum number of mirrors that yum contacts and ensuring that the configured mirrors are reachable.

What is the default value of the maxmirrors directive?

By default, Yum will try to contact only three mirrors.

Where is the yum.conf file located?

The “yum.conf” file is located in the /etc/ directory.

How can I view the configured mirrors in the yum repository?

This can be done by using the yum repolist command. It will show the configured repositories, along with the URLs of the mirrors.

Sources:

Sources for this article include:

  • The Linux Documentation Project: Setting up YUM for RPM Installation
  • Red Hat Documentation: Understanding yum.conf

Иногда при установке через консоль тех или иных пакетов может возникнуть ошибка

[Errno 256] No more mirrors to try.

Как правило это связано с тем, что метаданные репозитория http://repo.alter-os.ru/ обновились и их нужно перечитать.

Сделать это можно командой

# sudo yum clean all

Затем снова попробовать установить пакет(ы).

Содержание

  1. CentOS
  2. [SOLVED] Error during boot: gconf-sanity-check-2 error 256
  3. [SOLVED] Error during boot: gconf-sanity-check-2 error 256
  4. Why does yum return error: [Errno 256] No more mirrors to try ?
  5. Environment
  6. Issue
  7. Resolution
  8. Root Cause
  9. Diagnostic Steps
  10. 8 Comments
  11. The cache has been cleared
  12. Still we get the below error when we run yum install gcc
  13. в CentOS 7 не работает репозиторий, я что только не делал, все никак. Что не так с файлом настройки?
  14. YUM error 256 – Let’s fix it
  15. When does YUM error 256 occur?
  16. How do we fix?
  17. 1. Corrupted Yum cache
  18. 2. Incorrect repository
  19. Conclusion
  20. PREVENT YOUR SERVER FROM CRASHING!
  21. LINUX AND VMWARE STUFF
  22. Wednesday, June 5, 2019
  23. Yum failed with Errno 256 No more mirrors to try — Solved

CentOS

The Community ENTerprise Operating System

[SOLVED] Error during boot: gconf-sanity-check-2 error 256

[SOLVED] Error during boot: gconf-sanity-check-2 error 256

Post by Aquazone » 2014/10/05 10:58:49

recently I added an additional harddrive to my system, mounted it on /mnt/hdd and added the corresponding line to /etc/fstab. Then I moved parts of my own home folder (images, videos, music and download folders) to that mount point, set user rights, permissions and SE Linux contexts accordingly and left a symlink in my former home folder that directly points to the new location. Last, I did the same with /tmp and move that folder to /mnt/hdd/tmp as well, also checking all permissions, sticky bit, SE Linux context and so on. Technically, everything works fine, I can access my files and store new items in the new location.

BUT: Since I did the above steps, the booting process stops and shows the following error message(s). As I am using German locales, I am quoting the original error message first and then translate the message to English:

«Es gibt ein Problem mit dem Konfigurationsserver. (/usr/libexec/gconf-sanity-check-2 beendet mit Status 256)»
There is a problem with the configuration server. (/usr/libexec/gconf-sanity-check-2 terminated with status 256)

Then this message appears:
«Installationsproblem! Die Standardkonfiguration für die GNOME-Energieverwaltung wurde nicht korrekt installiert. Bitte wenden Sie sich an Ihren Systemadministrator.»
Installation problem. The default configuration for the GNOME energy settings are incorrectly installed. Please contact your system administrator.

The background image is broken, but the login manager appears and I can logon to the system as usual. Once logged in, there is no abnormal behavior. Everything runs fine and smooth as usual. Manual execution of gconf-sanity-check-2 produces no output. dmesg doesn’t give any hints. In .xsession-errors there is a reference that points to some policy kit error, but I don’t quite see why. Even though /tmp has been moved everything is accessible and has the correct permissions as far as I can tell. Other than that, nothing has changed to the system.

Источник

Why does yum return error: [Errno 256] No more mirrors to try ?

Environment

  • Red Hat Enterprise Linux
  • Red Hat Customer Portal
  • Red Hat Subscription Management (RHSM)
  • Red Hat Satellite

Issue

  • yum update fails with the error : [Errno 256] No more mirrors to try

Resolution

Check the network connectivity. If IP based Firewall is being used then whitelist the IPs that are mentioned in Public CIDR Lists for Red Hat (IP Addresses for cdn.redhat.com) for access to the content delivery network (CDN).

Check what files are present under /etc/yum.repos.d directory by:-

If the system is registered with Red Hat Subscription Manager (RHSM) via subscription-manager, rhel-source.repo and redhat.repo are present.

If any local repositories or any other media repositories are present, remove them by:-

Remove the old yum cache from the system by running the following commands:

Check if the valid repositories are getting listed by:-

If the previous solutions does not work, try reenabling each repository one by one with the following:-

Root Cause

  • Possible reasons for this issue:
    • Corrupted yum cache.
    • Inaccessibility of a repository URL from the system due to network-related issues.
    • Presence of customized or other media repositories.
    • Outdated whitelist when using IP-based Firewall configuration to access Red Hat’s Content Delivery Network (CDN).

Diagnostic Steps

yum update fails with any of the below errors:-

On Satellite Server it fails with this error as per /var/log/messages

Check the accessibility of the repository URL in the system/network.

Check the repositories under /etc/yum.repos.d

  • Product(s)
  • Red Hat Subscription Management
  • Red Hat Satellite
  • Red Hat Enterprise Linux
  • Red Hat Customer Portal
  • Component
  • yum
  • Category
  • Troubleshoot
  • Tags
  • customer_portal
  • rhel
  • rhn
  • rhn_classic
  • rhsm
  • satellite
  • subscription_management
  • yum

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Hi Team,
Please note we have local repository configured.

[root@mpe3100 yum.repos.d]# cat /etc/yum.repos.d/hp.repo
[hp]
name=hp
baseurl=file:///arjun/rhel6
enabled=1
gpgcheck=0
[root@mpe3100 yum.repos.d]#

The cache has been cleared

root@mpe3100 yum.repos.d]# rm -fr /var/cache/yum/*
[root@mpe3100 yum.repos.d]#

Still we get the below error when we run yum install gcc

Total download size: 75 M
Installed size: 221 M
Is this ok [y/N]: y
Downloading Packages:

Error Downloading Packages:
ppl-0.10.2-11.el6.x86_64: failure: Packages/ppl-0.10.2-11.el6.x86_64.rpm from hp: [Errno 256] No more mirrors to try.
sinjdoc-0.5-9.1.el6.x86_64: failure: Packages/sinjdoc-0.5-9.1.el6.x86_64.rpm from hp: [Errno 256] No more mirrors to try.
mpfr-2.4.1-6.el6.x86_64: failure: Packages/mpfr-2.4.1-6.el6.x86_64.rpm from hp: [Errno 256] No more mirrors to try.
zlib-devel-1.2.3-29.el6.x86_64: failure: Packages/zlib-devel-1.2.3-29.el6.x86_64.rpm from hp: [Errno 256] No more mirrors to try.

Please confirm if we need to download and install the last four packages listed in error

check dns resolver /etc/resolv.conf

solved the issue, was clear and to the point.

If you are using satelitte6 and have Content Views with custom channel names or different from the one used of the container base image (by default 7Server) remember to add the —releasever=xyz modifier to all your yum commands

RUN yum clean all && yum —releasever=7.3 update && yum repolist —disablerepo=* && yum-config-manager —disable * > /dev/null && yum-config-manager —releasever=7.3 —enable rhel-7-server-rpms && yum install —releasever=7.3 -y bzip2 fontconfig

Consider also this solution to the problem I had below. (to [Errno 14] but also encountered [Errno 256] with HTTPS Error 404 — Not Found. The Errno 14 is perhaps most likely due to URL and «releasever» setting while Errno 256 related to GPG.

https://access.redhat.com/solutions/2850911 — As GPG armor is not enabled on server side, so ensure repo_gpgcheck is set to 0 in yum.conf file for RHEL clients.

Fresh install of RHEL 7.4 on VirtualBox 5.2 and have the same issue, though this did not resolve it. Followed these instructions up to «Install the latest updates» https://developers.redhat.com/products/rhel/hello-world/#fndtn-virtualbox_get-ready-for-software-development

Following issue on «yum update» or «yum repolist» as root (though system already registered and attached to RedHat Subscription Manager)

Источник

в CentOS 7 не работает репозиторий, я что только не делал, все никак. Что не так с файлом настройки?

Все устроено по такому принципу, не работает, Кто знает в чем дело, помогите. Устанавливал с минимального установочного носителя CentOS-7-x86_64-Minimal-1511.iso

Пишет что что-то с репозиторием не то. Адрес репозитория в нормальне, пути в норме.

Пишет что что-то с репозиторием не то

Приведите точный текст ошибке, желательно на английском.

Как его записать? Сейчас с ubuntu livecd сижу.

bash-4.2# yum update Завантажені додатки: fastestmirror http://mirror.mirohost.net/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 — «Could not resolve host: mirror.mirohost.net; Unknown error» Спроба використання іншого дзеркала.

One of the configured repositories failed (CentOS-7 — Base), 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. Disable the repository, 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 base

4. 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 compromise:

yum-config-manager —save —setopt=base.skip_if_unavailable=true

failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try. http://mirror.mirohost.net/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 — «Could not resolve host: mirror.mirohost.net; Unknown error»

Could not resolve host: mirror.mirohost.net; Unknown error

Очевидно же, у тебя dns’ы плохие/не работают. Смотри настройки своей сети.

Источник

YUM error 256 – Let’s fix it

Oops!! Frustrated with YUM error 256? We can help you fix it.

This error occurs due to many reasons including corrupted YUM cache, configuration changes, etc.

At Bobcares, we often get requests from our customers to fix YUM error 256 as part of our Server Management Services.

Today, let’s get into the details on how our Support Engineers fix this problem.

When does YUM error 256 occur?

YUM is an open-source package management tool for RedHat Package Manager based Linux systems. It makes package installation a simple process.

However, while using YUM, we may encounter many errors. Today, we discuss in detail on how to fix one such yum error having code 256.

This error occurs mainly due to:

  • corrupted YUM cache
  • inaccessibility of a repository URL from the system
  • due to some configuration mistakes

Let’s see how our Engineers find the fix for this error.

How do we fix?

We just saw the common reasons that could result in Yum errors. And, the fix can vary depending on the triggering reason. Let’s see the top ones.

1. Corrupted Yum cache

Recently, one of our customers approached us with an error in his RHEL6 server. He was trying to install the java package.

We checked and confirmed that the folder /etc/yum.repos.d contained only valid repositories. The link was also working correctly when accessed via a browser. Thus the problem happened due to YUM cache corruption. So, we did the following:

Firstly, we removed the old YUM cache from the system by running the following commands:

Then updated the packages using

Thereafter, the java package installation went on fine.

2. Incorrect repository

Similarly, YUM error 256 can happen due to incorrect repository set up too.

In one of the cases, the customer was using a local repository on his server. Here the GPG check was failing.

Therefore, our Engineers fixed the problem by making the following changes in /etc/yum.repos.d/_local.repo.

That removed the GPG check and the yum started working again.

[Having trouble with YUM commands on your server? We’ll fix it for you.]

Conclusion

In short, this error occurs due to many reasons including corrupted YUM cache, inaccessibility of a repository URL from the system, etc. Also, we saw how our Support Engineers fix this error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

Источник

LINUX AND VMWARE STUFF

This Blog is to share our knowledge and expertise on Linux System Administration and VMware Administration

Wednesday, June 5, 2019

Yum failed with Errno 256 No more mirrors to try — Solved

Situation:
Yum is failed with Errno 256, No more mirrors to try.

root@testserver# yum list available | grep erna
https://rhn.test.com/pulp/repos/shared/lce-lcs_6month_rhel7/ccv-lcs_6month_rhel7/content/dist/rhel/server/7/7Server/x86_64/extras/os/repodata/repomd.

xml: [Errno 14] curl#58 — «SSL peer rejected your certificate as expired.»
Trying other mirror.

One of the configured repositories failed (Red Hat Enterprise Linux 7 Server — Extras (RPMs)),
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.

yum-config-manager —save —setopt=rhel-7-server-extras-rpms.skip_if_unavailable=true

failure: repodata/repomd.xml from rhel-7-server-extras-rpms: [Errno 256] No more mirrors to try.
https://rhn.test.com/pulp/repos/shared/lce-lcs_6month_rhel7/ccv-lcs_6month_rhel7/content/dist/rhel/server/7/7Server/x86_64/extras/os/repodata/repomd.

xml: [Errno 14] curl#58 — «SSL peer rejected your certificate as expired.»

Solution:
Becasue of corrupted yum cache, getting this error. So refresh the subscription-manager clean the old cache & run the yum command

Источник

Not able to download packages with yum due to the error ‘[Errno 256] No more mirrors to try’? We can help you with it.

Usually, corrupted yum cache or repo directory ends up in this error. A few file cleanups can easily fix this.

This can also occur due to an outdated whitelist of the Public CIDR list.

At Bobcares, we often fix yum errors, as a part of our Server Management Services.

Today, let’s have a look into this yum error. And see how our Support Engineers fix this.

Why does yum downloading packages end up in error?

We often use yum to install packages and dependencies in a single command. However, sometimes we have seen this yum updates ending up with an error.

Mostly, this happens due to errors with yum cache, local files in the repository folder, outdated firewall rules, etc.

Let’s check out how our Support Engineers fix this error in each case.

How we fix the yum error in downloading packages?

The error message while installing the FTP package appears as,

yum error downloading packages in Linux.

Now let’s have a look at each reason and its fix.

1. Clear yum cache to download packages

Old cache in the system can cause errors while downloading packages. Hence our Support Engineers delete the cache using the command,

rm -rf /var/cache/yum/*

In addition, we also delete the metadata for the enables repositories. For this, we use the command,

yum clean metadata

Later, we clean up the yum folder using the command,

yum clean all

Finally, we check the yum update again. Thereby, we ensure to fix the error.

2. Check repository to fix yum error

In some servers, the yum repository contains corrupted files. And accessing these repositories while updating can cause errors. So our Support Engineers check the folder yum.repos.d

Initially, we list the files using the command,

ll /etc/yum.repos.d

Later we check the system registry. Our Experts check the files under both RHN classic and RHSM. And removes the error causing local repositories. Later, we check if the update is running successfully.

3. Network access to download packages

Similarly, network access is important for yum updates. So, we check the access to the repository URL by ping.

In addition, we also ensure to whitelist the Public CIDR list for Red Hat. Because outdated whitelist restricts access to the CDN can result in errors.

Usually, yum download the packages using the base URL in the config file. This URL is cdn.redhat.com. Basically, there are multiple servers resolving to this address.

So we whitelist these IPs listed in the Public CIDR list.

[Need assistance in fixing yum errors? – We are available 24/7]

Conclusion

In short, yum error downloading packages occur due to corrupted cache or repository. Another possible reason is network access denial due to the firewall in the system. Today, we saw how our Support Engineers fix this error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

bash-4.2# yum update
Завантажені додатки: fastestmirror
http://mirror.mirohost.net/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 — «Could not resolve host: mirror.mirohost.net; Unknown error»
Спроба використання іншого дзеркала.

One of the configured repositories failed (CentOS-7 — Base),
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. Disable the repository, 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 base

4. 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
compromise:

yum-config-manager —save —setopt=base.skip_if_unavailable=true

failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.
http://mirror.mirohost.net/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 — «Could not resolve host: mirror.mirohost.net; Unknown error»

serhey

(28.08.16 18:19:56 MSK)

  • Показать ответ
  • Ссылка

Понравилась статья? Поделить с друзьями:
  • Ошибка no module named pandas
  • Ошибка no match for operator operand types are std
  • Ошибка no module named numpy
  • Ошибка no main manifest attribute in jar
  • Ошибка no module named encodings