LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-21-2020, 08:18 AM   #1
jim.thornton
Member
 
Registered: May 2007
Posts: 430

Rep: Reputation: 19
Error from yum being emailed daily


I'm having trouble with yum. I was able to run yum manually without a problem. However, I have it setup to run automatically. When it would run automatically, I get the following error:

Code:
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
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
I received this message as an email.

I tried uninstalling yum and installing DNF and I'm getting the same error.

I can go into my system and type:
# dnf update

And it works without a problem, but daily I'm still getting the email mentioned above. I've searched to try and figure out how to fix it but can't figure it out.

Can anyone help with this please? I find this puzzling because I've got yum uninstalled now and have installed dnf-automatic instead. But, it is still sending the same message.


My environment is:
Code:
]$ cat /etc/*release
CentOS Linux release 7.9.2009 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.9.2009 (Core)
CentOS Linux release 7.9.2009 (Core)

Last edited by jim.thornton; 12-21-2020 at 08:41 AM.
 
Old 12-21-2020, 08:28 AM   #2
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
CentOS 6 reached its end of life past November. You should point your /etc/yum.repos.d/CentOS-Base.repo to https://vault.centos.org where it is now relegated.

Or just comment it out completely and add a new section for 6.10 to /etc/yum.repos.d/CentOS-Vault.repo instead (and don't forget to enable it).

Even better, consider migrating your system to CentOS 7.

Last edited by shruggy; 12-21-2020 at 08:41 AM.
 
Old 12-21-2020, 08:51 AM   #3
jim.thornton
Member
 
Registered: May 2007
Posts: 430

Original Poster
Rep: Reputation: 19
I just updated my last post. It must have been at the same time that you were posting, but I am running Centos 7.9.2009
 
Old 12-21-2020, 09:09 AM   #4
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Then why does it still refer to 6:
Quote:
Originally Posted by jim.thornton View Post
Code:
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt

Last edited by shruggy; 12-21-2020 at 09:36 AM.
 
Old 12-21-2020, 09:46 AM   #5
jim.thornton
Member
 
Registered: May 2007
Posts: 430

Original Poster
Rep: Reputation: 19
I'm not sure. Here is what is in my /etc/yum.repos.d/CentOS-Base.repo:
Code:
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
I already showed the results of: # cat /etc/*release

I have a bunch of .repo files in there:
CentOS-Base.repo
CentOS-CR.repo
CentOS-Debuginfo.repo
CentOS-fasttrack.repo
CentOS-Media.repo
CentOS-Sources.repo
CentOS-Vault.repo
CentOS-x86_64-kernel.repo
epel.repo
epel-testing.repo
 
Old 12-21-2020, 10:35 AM   #6
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Ok, I suppose lsb_release -r also will show 7.9.2009.

Now, try yum clean all. If after that there is still something left in /var/cache/yum/x86_64 then remove it manually.

Also, please show the output of ls /etc/yum/vars. If releasever is defined there, remove the file.

Last edited by shruggy; 12-21-2020 at 10:39 AM.
 
Old 12-21-2020, 01:20 PM   #7
auge
Member
 
Registered: May 2002
Location: Germany
Distribution: CentOS, Debian, LFS
Posts: 100
Blog Entries: 1

Rep: Reputation: Disabled
Delete the yum-cache, download the actual centos-release-rpm to some place, then delete all repo-files and reinstall centos-release-rpm
 
Old 12-21-2020, 02:04 PM   #8
jim.thornton
Member
 
Registered: May 2007
Posts: 430

Original Poster
Rep: Reputation: 19
Should I uninstall DNF then? I uninstalled yum and installed DNF thinking that would solve the problem but it didn't.
 
Old 12-21-2020, 02:19 PM   #9
auge
Member
 
Registered: May 2002
Location: Germany
Distribution: CentOS, Debian, LFS
Posts: 100
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by jim.thornton View Post
Should I uninstall DNF then? I uninstalled yum and installed DNF thinking that would solve the problem but it didn't.
leave yum and dnf like they are, your problem is the combo of repos and that the sources can not be found properly. Kick all of them out, get the original config from an actual centos-release-rpm from a mirror near you: For example: mirror.centos.org/centos/7/os/x86_64/Packages/centos-release-7-9.2009.0.el7.centos.x86_64.rpm

You need to look into the files if the repo is enabled=1

Basically you need only "base" and "updates" enabled, if this works add "extras", then if needed and fitting to your company policy "Centosplus" and "Fedora-Epel". Don't mix epel and epel-testing, when you don't know what you are doing. Most likely, when you didn't change anything, they aren't enabled anyways.

Last edited by auge; 12-21-2020 at 02:21 PM.
 
Old 12-22-2020, 12:49 PM   #10
jim.thornton
Member
 
Registered: May 2007
Posts: 430

Original Poster
Rep: Reputation: 19
I did the following:

1. backed up all repos in /etc/yum.repos.d
2. Deleted all repos out of /etc/yum.repos.d
3. Deleted /var/cache/yum
4. #dnf clean all
5. Downloaded the suggested rpm package and extracted it -> I copied all the repos into /etc/yum.repos.d
6. # dnf update

From there I waited the night I received the following email at 3:56am:

Code:
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
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
So it looks like that did not help at all.

When I manually run the #dnf update (or #yum update -- when that was installed) it works fine. No error messages regarding repos (only one about MariaDB).

Any other suggestions on how to track down what is happening?
 
Old 12-22-2020, 01:02 PM   #11
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Have you looked into /etc/dnf/vars resp. /etc/yum/vars? What files are in that directory? If releasever is there then remove it.
 
Old 12-22-2020, 01:03 PM   #12
auge
Member
 
Registered: May 2002
Location: Germany
Distribution: CentOS, Debian, LFS
Posts: 100
Blog Entries: 1

Rep: Reputation: Disabled
please just use base, updates and show us all repo-confs that are enabled (or have no enabled= in their section).

Did you do as suggested and only use base and updates first and then try out the rest? There now seems to be one repo in use that doesn't fit in. Like you use fedora-epel targetting the wrong rhel version.
 
Old 12-22-2020, 01:50 PM   #13
jim.thornton
Member
 
Registered: May 2007
Posts: 430

Original Poster
Rep: Reputation: 19
Quote:
Originally Posted by shruggy View Post
Have you looked into /etc/dnf/vars resp. /etc/yum/vars? What files are in that directory? If releasever is there then remove it.
There is nothing at all in /etc/dnf/vars

And /etc/yum/vars only contains two files: contentdir & infra
 
Old 12-22-2020, 01:59 PM   #14
jim.thornton
Member
 
Registered: May 2007
Posts: 430

Original Poster
Rep: Reputation: 19
Quote:
Originally Posted by auge View Post
please just use base, updates and show us all repo-confs that are enabled (or have no enabled= in their section).

Did you do as suggested and only use base and updates first and then try out the rest? There now seems to be one repo in use that doesn't fit in. Like you use fedora-epel targetting the wrong rhel version.
No, I forgot to do that part. I've now removed all the repos again and my only file is CentOS-Base.repo and the contents are:

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/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#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/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
enabled=0
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/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
enabled=0
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
I guess I will waiting another day and see what happens.
 
Old 12-22-2020, 02:12 PM   #15
auge
Member
 
Registered: May 2002
Location: Germany
Distribution: CentOS, Debian, LFS
Posts: 100
Blog Entries: 1

Rep: Reputation: Disabled
That looks good. Is this working? What happens when you update?
When it is okay put in the other repos one by one and update again and again until you find the faulty/problematic one. Perhaps also look if you need them at all.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Way To Have Output Of Cron Job Emailed jmoschetti45 Linux - General 1 05-22-2007 01:42 AM
Logs - get them emailed to me yogaboy Linux - General 2 02-19-2007 08:02 AM
non LQ user emailed me thru LQ! titanium_geek LQ Suggestions & Feedback 8 11-12-2006 10:52 AM
Daily warning messages - why not emailed? kalahari875 Mandriva 3 01-23-2005 06:52 AM
Is there a way to get log files emailed? Pcghost Linux - General 2 02-20-2003 01:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration