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

Wednesday, June 05, 2019 0
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

root@testserver# subscription-manager refresh
All local data refreshed
root@testserver# yum clean all
root@testserver#
root@testserver# yum list available | grep erna
AdaptermFernablesung_15_hq.noarch
DatentauschInternational_hq.noarch
Fernablesung_2.37_hq.noarch 2.0.0.RELEASE-8 tec-x86_64-server-software-release-7
Fernablesung_Application_hq.noarch
Fernablesung_Comm_3.42_hq.noarch 5.4.1.RELEASE-92 tec-x86_64-server-software-release-7
Fernablesung_Helper_hq.noarch 7.1.5.RELEASE-126 tec-x86_64-server-software-release-7
Fernablesung_IF_3.08_hq.noarch 2.1.0.RELEASE-4 tec-x86_64-server-software-release-7
Fernablesung_IF_3.10_hq.noarch 6.1.1.RELEASE-45 tec-x86_64-server-software-release-7
Fernablesung_Tss3_hq.noarch 1.1.1.RELEASE-315 tec-x86_64-server-software-release-7
ems-AdaptermFernablesung_15_hq.noarch
ems-Fernablesung_hq.noarch 5.2.0.RELEASE-28 tec-x86_64-server-software-release-7
gnome-shell-extension-alternate-tab.noarch
gnome-shell-extension-alternative-status-menu.noarch
root@testserver#