SOLVED YumRepo Error and Cannot find valid baseurl

jndawson

Well-Known Member
Aug 27, 2014
350
39
78
Western US
cPanel Access Level
DataCenter Provider
After updates ran last night, we got this error message:
Code:
Maintenance ended; however, it did not exit cleanly (256). The following events were logged: “scripts/rpmup”. Review the update logs to determine why the update failed.
and
Code:
[2020-12-02 02:44:21 -0800] E [/usr/local/cpanel/scripts/rpmup] The “/usr/local/cpanel/scripts/rpmup” command (process 27258) reported error number 1 when it ended.
Ran /scripts/rpmup:
Code:
[ root@cp1 ~># /scripts/rpmup
checkyum version 22.3  (excludes: bind-chroot ruby)
info [rpmup] Starting yum execution â--assumeyes --config /etc/yum.conf updateâ
                                                                               Loaded plugins: fastestmirror, security, tsflags, universal-hooks
Setting up Update Process
Loading mirror speeds from cached hostfile
Error: Cannot find a valid baseurl for repo: base
YumRepo Error: All mirror URLs are not using ftp, http[s] or file. Eg. Invalid release/repo/arch combination/removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
info [rpmup] Completed yum execution â--assumeyes --config /etc/yum.conf updateâ
                                                                                (XID mf5ups) â/usr/bin/yumâ1â
Ran yum update:
Code:
[ root@cp1 ~># yum update
Loaded plugins: fastestmirror, security, tsflags, universal-hooks
Setting up Update Process
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base
Ran yum repolist:
Code:
[ root@cp1 ~># yum repolist
Loaded plugins: fastestmirror, security, tsflags, universal-hooks
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
EA4                                                                                                                  | 2.9 kB     00:00 ...
cpanel-addons-production-feed                                                                                        | 2.9 kB     00:00 ...
cpanel-plugins                                                                                                       | 2.9 kB     00:00 ...
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/extras/mirrorlist.txt
kernelcare                                                                                                           | 2.6 kB     00:00
mysql-connectors-community                                                                                           | 2.6 kB     00:00
mysql-tools-community                                                                                                | 2.6 kB     00:00
mysql57-community                                                                                                    | 2.6 kB     00:00
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/updates/mirrorlist.txt
vmware-tools                                                                                                         |  951 B     00:00
repo id                                                repo name                                                                      status
EA4                                                    EA4 ( EasyApache 4 )                                                           4,515
cpanel-addons-production-feed                          cPanel Addons Production Feed                                                     47
cpanel-plugins                                         cPanel Plugins project                                                            40
base                                                   CentOS-6 - Base                                                                6,713
extras                                                 CentOS-6 - Extras                                                                 47
kernelcare                                             kernelcare                                                                       104
mysql-connectors-community                             MySQL Connectors Community                                                       145
mysql-tools-community                                  MySQL Tools Community                                                             96
mysql57-community                                      MySQL 5.7 Community Server                                                       432
updates                                                CentOS-6 - Updates                                                             1,193
vmware-tools                                           VMware Tools for Red Hat Enterprise Linux 6 . x86_64                              38
repolist: 13,370
Any idea what's going on and how to fix it?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,643
2,629
363
cPanel Access Level
Root Administrator
Hey there! The first thing I would try would be this, since it mentions a Yum cache file in your output:

Code:
yum clean all
yum makecache
yum update
If that doesn't resolve the issue, you'll need to manually check the repo files in /etc/yum.repos.d to see which one may not be properly configured, but this indicates a problem with the operating system and Yum tools themselves and not an issue with the cPanel software.
 

jndawson

Well-Known Member
Aug 27, 2014
350
39
78
Western US
cPanel Access Level
DataCenter Provider
Hey there! The first thing I would try would be this, since it mentions a Yum cache file in your output:

Code:
yum clean all
yum makecache
yum update
If that doesn't resolve the issue, you'll need to manually check the repo files in /etc/yum.repos.d to see which one may not be properly configured, but this indicates a problem with the operating system and Yum tools themselves and not an issue with the cPanel software.
I should have included everything we did, which indicates it's an issue with whatever is going on with yum. I think.
Code:
[ root@cp1 ~># yum clean all
Loaded plugins: fastestmirror, security, tsflags, universal-hooks
Cleaning repos: EA4 cpanel-addons-production-feed cpanel-plugins base extras kernelcare mysql-connectors-community mysql-tools-community
              : mysql57-community updates vmware-tools
Cleaning up Everything
Cleaning up list of fastest mirrors
[ Wed Dec 02 13:08:18 ]
[ root@cp1 ~># yum makecache
Loaded plugins: fastestmirror, security, tsflags, universal-hooks
Determining fastest mirrors
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base
[ Wed Dec 02 13:08:31 ]
[ root@cp1 ~># yum update
Loaded plugins: fastestmirror, security, tsflags, universal-hooks
Setting up Update Process
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,643
2,629
363
cPanel Access Level
Root Administrator
At this point, I'd poke your hosting provider as something with Yum and the OS isn't allowing the mirror list files to be built. There isn't going to be anything on the cPanel side that will help get this working, and you'll want to be careful to ensure no additional damage happens to the RPM database that can't be repaired.

I'm used to seeing these issues on CentOS 5 systems as they changed how those update, but on CentOS 6 I would be cautious about running any unnecessary commands at this point.
 

jndawson

Well-Known Member
Aug 27, 2014
350
39
78
Western US
cPanel Access Level
DataCenter Provider
At this point, I'd poke your hosting provider as something with Yum and the OS isn't allowing the mirror list files to be built. There isn't going to be anything on the cPanel side that will help get this working, and you'll want to be careful to ensure no additional damage happens to the RPM database that can't be repaired.

I'm used to seeing these issues on CentOS 5 systems as they changed how those update, but on CentOS 6 I would be cautious about running any unnecessary commands at this point.
We are the hosting company, and I should have been clearer: All of our Centos 6 and Cloudlinux 7 boxes are all having the same problem with updates. All servers are set for auto-updates, and we've changed nothing.
 

kandh

Registered
Dec 3, 2020
1
0
1
London
cPanel Access Level
Root Administrator
Centos 6 expired on 30th November 2020
You have to edit the CentOS-Base.repo
to point to vault every where or set up
a proxy to change the search to the vault

in the repo file change everywhere
name=CentOS-6.10 - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=http://vault.centos.org/6.10/centosplus/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

depending on what you have in the file
grep 'name=' CentOS-Base.repo
name=CentOS-$releasever - Base
name=CentOS-$releasever - Updates
name=CentOS-$releasever - Addons
name=CentOS-$releasever - Extras
name=CentOS-$releasever - Plus
name=CentOS-$releasever - Contrib
 

PelicanSupport

Registered
Dec 3, 2020
1
0
1
Here
cPanel Access Level
Website Owner
@jndawson - Hi, I was having the same issues on my local CentOS 6 box in the office. And was searching for similar issues and stumbled across your post.
I signed up to post here. Not sure if it will help you though.

CentOS 6 became EOL on the 30th November, 3 days ago. And all the repos have been archive to https://vault.centos.org/.
I have just edited my /etc/yum.repos.d/CentOS-Base.repo file to the below:

Code:
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=https://vault.centos.org/6.10/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
baseurl=https://vault.centos.org/6.10/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
baseurl=https://vault.centos.org/6.10/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
So while I will have no more security updates for CentOS 6, but also no more errors.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,643
2,629
363
cPanel Access Level
Root Administrator
So it looks like I have new information on this today :D

We have released an autofixer for this as part of case CPANEL-35078 since the CentOS 6 repositories have been moved to the vault due to that OS becoming end-of-life. This should resolve the issues that you were seeing, @jndawson

However, if you have CentOS 7 or CloudLinux 7 boxes with Yum issues, that would be a different issue. There were some repository issues with CloudLinux over the last 24 hours, but that should also be resolved at this point.
 

jndawson

Well-Known Member
Aug 27, 2014
350
39
78
Western US
cPanel Access Level
DataCenter Provider
So it looks like I have new information on this today :D

We have released an autofixer for this as part of case CPANEL-35078 since the CentOS 6 repositories have been moved to the vault due to that OS becoming end-of-life. This should resolve the issues that you were seeing, @jndawson

However, if you have CentOS 7 or CloudLinux 7 boxes with Yum issues, that would be a different issue. There were some repository issues with CloudLinux over the last 24 hours, but that should also be resolved at this point.
Great - thanks for the update!

Where's the autofixer? We had every server's update fail again last night.
 

ganeshvr

Registered
Dec 15, 2020
1
0
0
Bangalore
cPanel Access Level
Website Owner
Centos 6 expired on 30th November 2020
You have to edit the CentOS-Base.repo
to point to vault every where or set up
a proxy to change the search to the vault

in the repo file change everywhere
name=CentOS-6.10 - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=http://vault.centos.org/6.10/centosplus/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

depending on what you have in the file
grep 'name=' CentOS-Base.repo
name=CentOS-$releasever - Base
name=CentOS-$releasever - Updates
name=CentOS-$releasever - Addons
name=CentOS-$releasever - Extras
name=CentOS-$releasever - Plus
name=CentOS-$releasever - Contrib
since Dec15 2020, even this change is not working

[root@host1 yum.repos.d]# yum install httpd-devel
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror, presto
Setting up Install Process
Determining fastest mirrors
http://vault.centos.org/6.10/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "Failed to connect to 2600:1f16:c1:5e03:a992:8ee1:99d2:6f8: Network is unreachable"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

could you help with this?
 

garylee

Registered
Dec 18, 2020
2
0
1
virginia
cPanel Access Level
Root Administrator
If it didn't happen for you automatically, which it may not if there are update issues, you can run this:

Code:
/scripts/autorepair centos6_base_repo_is_no_more
Can you try that and let me know the results?
I could not find this script (/scripts/autorepair centos6_base_repo_is_no_more) anywhere. please post a link. thanks!
 

xJiiKo

Registered
Dec 25, 2020
1
0
1
Germany
cPanel Access Level
Root Administrator
The script isn't something that will tab-complete on a Linux system, but should be there if you call it. Are you seeing a specific error message when you try and run that script?
I probably got the same error, how can I get the autorepair script? I installed the minimal version of centos 6.5.

Code:
[root@CrimsonVigilant-VM ~]# /scripts/autorepair centos6_base_repo_is_no_more
-bash: /scripts/autorepair: No such file or directory
[root@CrimsonVigilant-VM ~]#
 
Last edited: