Symptoms
An error similar to the following is encountered when attempting to run the yum command.
CONFIG_TEXT: http://yum.mariadb.org/10.2/rhel7-amd64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
The "update-packages" script may also fail with a similar error:
CONFIG_TEXT: Processing: Running update-packages
Processing command /usr/local/cpanel/scripts/update-packages
[/usr/local/cpanel/scripts/update-packages] MariaDB103 5.2 B/s | 10 B 00:01
[/usr/local/cpanel/scripts/update-packages] Error: Failed to download metadata for repo 'MariaDB103': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
[/usr/local/cpanel/scripts/update-packages] (XID XXXXX) “/usr/bin/yum” reported error code “1” when it ended:
E [/usr/local/cpanel/scripts/update-packages] The “/usr/local/cpanel/scripts/update-packages” command (process 12345) reported error number 1 when it ended.
Cause
As each MariaDB version reaches end-of-life, the main repository is archived. There are mirrors of these end-of-life versions of MariaDB to allow users to still install the latest patches, but you should consider upgrading to an actively maintained version.
These repositories are not used on CloudLinux systems and should be disabled..
Resolution
- Access the server's command line as the
rootuser via SSH or "Terminal" in WHM. - Open the "/etc/yum.repos.d/mariadb.repo" file in a text editor.
CPANEL_WARN: This file may also be located at "MariaDB10X.repo" where the X coresponds the minor version of MariaDB (eg, 10.3 "MariaDB103.repo")
- Locate the baseurl entry.
CONFIG_TEXT: baseurl = http://yum.mariadb.org/10.2/rhel7-amd64
- Replace the "yum.mariadb.org" section of the URL with "archive.mariadb.org/yum".
CONFIG_TEXT: baseurl = http://archive.mariadb.org/yum/10.2/rhel7-amd64
- Confirm this URL exists by navigating to http://archive.mariadb.org/yum/ in your browser and confirming this path.
- Save the changes and exit the text editor.
-
Clean the yum cache
# yum clean all
-
Rebuild the yum cache
# yum makecache
- Access the server's command line as the
rootuser via SSH or "Terminal" in WHM. - Identify the name of the repo you must modify. As an example, the error above "Failed to download metadata for repo 'MariaDB103'" is related to the "MariaDB103" repository.
- Disable the repository, replacing "MariaDB103" with the version in the error. As root, run:
# yum-config-manager --disable MariaDB103
-
Clean the yum cache
# yum clean all
-
Rebuild the yum cache
# yum makecache
- Access the server's command line as the
rootuser via SSH or "Terminal" in WHM. - Identify the name of the repo you must modify. As an example, the error above "Failed to download metadata for repo 'MariaDB103'" is related to the "MariaDB103" repository.
- Disable the repository, replacing "MariaDB103" with the version in the error. As root, run:
# dnf-config-manager --disable MariaDB103
-
Clean the DNF cache
# dnf clean all
-
Rebuild the DNF cache
# dnf makecache
Comments
0 comments
Article is closed for comments.