Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

yum doesn't have enough cached data to continue

avatar
Explorer

File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 303, in _call

    raise ExecutionFailed(err_msg, code, out, err)
resource_management.core.exceptions.ExecutionFailed: Execution of '/usr/bin/yum -d 0 -e 0 -y install ranger_2_6_3_0_235-admin' returned 1.  One of the configured repositories failed (HDP-2.6-repo-1),
 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=HDP-2.6-repo-1 ...

     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 HDP-2.6-repo-1
        or
            subscription-manager repos --disable=HDP-2.6-repo-1

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

            yum-config-manager --save --setopt=HDP-2.6-repo-1.skip_if_unavailable=true

failure: repodata/repomd.xml from HDP-2.6-repo-1: [Errno 256] No more mirrors to try.
1 ACCEPTED SOLUTION

avatar
Master Mentor

@Lok! Reddy

On the host where the installation is failing please check if the repos are correct?

Specially the baseurl

# grep 'baseurl' /etc/yum.repos.d/* | grep HDP

.

Also please check if those the link mentioned in the baseurl are accessible? Just append "/repodata/repomd.xml" in the URL and then test if it is accessible?

Example: if baseurl is "http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.6.3.0" then please try accessing it as following to verify the access. Please check all the URLs

# curl -v http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.6.3.0/repodata/repomd.xml

.

If the URLs are accessible then in that case try cleaning the yum cache by running the command.

# yum clean all

.

After yum clean try running the following command again to verify if the issue persist?

# yum -y install ranger_2_6_3_0_235-admin

.

View solution in original post

2 REPLIES 2

avatar
Master Mentor

@Lok! Reddy

On the host where the installation is failing please check if the repos are correct?

Specially the baseurl

# grep 'baseurl' /etc/yum.repos.d/* | grep HDP

.

Also please check if those the link mentioned in the baseurl are accessible? Just append "/repodata/repomd.xml" in the URL and then test if it is accessible?

Example: if baseurl is "http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.6.3.0" then please try accessing it as following to verify the access. Please check all the URLs

# curl -v http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.6.3.0/repodata/repomd.xml

.

If the URLs are accessible then in that case try cleaning the yum cache by running the command.

# yum clean all

.

After yum clean try running the following command again to verify if the issue persist?

# yum -y install ranger_2_6_3_0_235-admin

.

avatar
Master Mentor

@Lok! Reddy

Also if you see multiple OLD "ambari-hdp-<repoid>.repo" files inside the "/etc/yum.repos.d/" then move the unwanted files from there. Ideally there should be only one file pointing to correct HDP version with accessible baseurl like the file path

Example Path

# cat /etc/yum.repos.d/ambari-hdp-1.repo

.