Receiving an error when attempting to access yum repository

  • KM03711843
  • 22-Sep-2020
  • 22-Sep-2020

Summary

Receiving an error when attempting to access yum repository

Error

When attempting to install a rpm package from a yum repository, the following error message is thrown:

failure: repodata/repomd.xml from ambari: [Errno 256] No more mirrors to try. http(s)://<repo_FQDN>/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found

 

Cause

This issue is usually caused by no network connectivity, or the affected system(s) cannot reach the yum repository URL.

 

Fix

There are a several steps listed below to validate access to yum repository. The steps are broken down into two section:

  • Yum Repository - Internal
  • Yum Repository - External

Yum Repository - Internal

Clean yum cache directory

The yum cache directory may contain old yum repository information that needs to be flushed from the affected node(s)/system(s). To do this, please perform the steps below:

1. Log on to the affected node(s) as the Interset user.
2. Type in the following command to clean the yum cache repository:

sudo yum clean all Check network connectivity

There are times, where network connectivity could cause issues. Please perform the following steps below:

  1. Log on to the affected node(s) as the Interset user.

  2. Please attempt toping and perform a traceroute on internal systems and the yum repository system to ensure

    network connectivity is successful: To ping a node/system, type in:

    ping <internal_system_FQDN>

    To traceroute to a node/system, type in:
    1. traceroute <internal_system_FQDN>

Check yum repository via browser

  1. Log on to the affected node(s) as the Interset user.

  2. Type in the following command and navigate to the/etc/yum.repos.d/ directory:

    cd /etc/yum.repos.d/

  3. Locate the yum repository file that is throwing the HTTP Error 404 - Not Found, and type in the following command

    to concatenate the file:
    cat <yum_repo_name>.repo

  4. Copy the value for the baseurl, and paste it into a web browser.

  5. IF URL resolves then please attempt the installation of the RPM package(s) again.

  6. IF URL does not resolve, please verify if the yum repository system/web server is up and running.

Yum Repository - External

Clean yum cache directory

The yum cache directory may contain old yum repository information that needs to be flushed from the affected system. To do this, please perform the steps below:

1. Log on to the affected node(s) as the Interset user.
2. Type in the following command to clean the yum cache repository:

sudo yum clean all Check network connectivity

There are times, where network connectivity could cause issues. Please perform the following steps below:

1. Log on to the affected node(s) as the Interset user.
2. Please attempt to ping public DNS name and/or the public yum repository DNS name (i.e. google.com):

EXAMPLE: ping google.com Check yum repository via browser

  1. Log on to the affected node(s) as the Interset user.

  2. Type in the following command and navigate to the/etc/yum.repos.d/ directory:

    cd /etc/yum.repos.d/

  3. Locate theyum repository file that isoutputting theHTTP Error 404 - Not Found, and type in the following

    command to concatenate the file:
    sudo cat <yum_repo_name>.repo

  4. Copy the value for the baseurl and paste it into a web browser.

  5. IF URL resolves then please attempt the installation of the RPM package(s) again.

  6. IF URL does not resolve, please contact Interset support for more assistance.