https://cdn.redhat.com/content/dist/rhel/server/7/%24releasever/x86_64/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Listing of yum repolist gives error:
https://cdn.redhat.com/content/dist/rhel/server/7/%24releasever/x86_64/source/SRPMS/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
I was able to list all repo and update server few days back but now it gives error. Firewall disable, I can ping cdn.redhat.com
Tried
rm -rf /var/cache/yum/*
yum clean all
yum repolist still gives same error
yum repolist
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager, versionlock
https://cdn.redhat.com/content/dist/rhel/server/7/%24releasever/x86_64/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article
https://access.redhat.com/articles/1320623
If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.
https://cdn.redhat.com/content/dist/rhel/server/7/%24releasever/x86_64/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
https://cdn.redhat.com/content/dist/rhel/server/7/%24releasever/x86_64/source/SRPMS/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
repo id repo name status
rhel-7-server-rpms/$releasever/x86_64 Red Hat Enterprise Linux 7 Server (RPMs) 0
rhel-7-server-source-rpms/$releasever/x86_64 Red Hat Enterprise Linux 7 Server (Source RPMs) 0
repolist: 0
ll /etc/yum.repos.d/
total 100
-rw-r--r--. 1 root root 101162 Jul 5 00:19 redhat.repo
Any help how to fix this issue
Responses
Syed,
There is an error in the URL it is attempting to retrieve
https://cdn.redhat.com/content/dist/rhel/server/7/%24releasever...
The %24 is a '$' symbol, so it looks like you have a variable in the URL name that isn't being substituted correctly. What does the repo line look like in the redhat.repo file you have listed?
Hi Guru, The repo looks ok to me. Please find the repo details as below:
Repo ID: rhel-7-server-rpmsRepo Name: Red Hat Enterprise Linux 7 Server (RPMs) Repo URL: https://cdn.redhat.com/content/dist/rhel/server/7/$releasever/$basearch/os Enabled: 1
Thanks, Syed
Yum isn't resolving the $releasever variable correctly. From the documentation:
You can use this variable to reference the release version of Red Hat Enterprise Linux. Yum obtains the value of $releasever from the distroverpkg=value line in the /etc/yum.conf configuration file. If there is no such line in /etc/yum.conf, then yum infers the correct value by deriving the version number from the redhat-release-server package. The value of $releasever typically consists of the major release number and the variant of Red Hat Enterprise Linux, for example 6Client, or 6Server.
Do you have this defined in the /etc/yum.conf file? Do you have the redhat-release-server package currently installed so yum can fall back to it to determine the correct releasever if it's not in yum.conf?
If you have repo_gpgcheck set to 1 in /etc/yum.conf, try commenting it out and try yum update again.
It looks like this is the problem, you don't have an entry in yum.conf for the releasever and there is no redhat-release-server package for yum to fall back on. It could probably be argued that this is a bug.. but that aside.. the immediate fix would be to put an entry in your yum.conf.
Can you add the following to your yum.conf file and try again?
distroverpkg=7Server
Is this in a container? it seems strange that you have ended up in this situation with a standard OS install.
Is this a container? how was this system installed?
Can you manually install the redhat-release-server rpm package from the installation media using rpm and try again?
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
