Symptom
When attempting to update packages, you receive errors that resemble the following:
CONFIG_TEXT: Errors during downloading metadata for repository 'php-els':
- Status code: 404 for https://ipv4.repo.tuxcare.eu-hel.cl-mirror.net/alt-php-els//rpm/el/10/stable/x86_64/repodata/repomd.xml (IP: 157.180.22.9)
Error: Failed to download metadata for repo 'php-els': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
You may also see a 403 error instead, with a Python/DNF traceback, such as:
CONFIG_TEXT: Error: "/usr/bin/python3" reported error code "1" when it ended: Errors during downloading metadata for repository 'php-els':
- Status code: 403 for https://:@repo.alt.tuxcare.com/alt-php-els/rpm/el/10/stable/x86_64/repodata/repomd.xml (IP: 2001:db8:f61:a1ff:0:0:0:80)
...
dnf.exceptions.RepoError: Failed to download metadata for repo 'php-els': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
w/ /usr/local/cpanel/bin/packman_get_list_json
Both variants are caused by the same underlying issue below. After applying the fix, rebuilding the cache will often resolve this:
CONFIG_TEXT: dnf makecache
Cause
This error occurs when the TuxCare ELS PHP repo is installed, and the server is trying to resolve the packages using IPv6.
Resolution
Access your server using SSH as the 'root' user.
Using your preferred text editor, open the YUM configuration file here:
CONFIG_TEXT: /etc/yum.conf
Add the following to it's own line:
CONFIG_TEXT: ip_resolve=4
Save the file and rebuild the YUM cache:
# yum clean all && yum makecache
Access your server using SSH as the 'root' user.
Using your preferred text editor, open the DNF configuration file here:
CONFIG_TEXT: /etc/dnf/dnf.conf
Add the following to it's own line:
CONFIG_TEXT: ip_resolve=4
Save the file and rebuild the DNF cache:
# dnf clean all && dnf makecache
Comments
0 comments
Article is closed for comments.