Page 1 of 1

Errors Upgrading Nagios XI

Posted: Wed Dec 02, 2020 8:44 pm
by ei-admin
Not sure what to do please help :cry:


DATE: Wed Dec 2 17:32:44 PST 2020

DISTRO INFO:
CentOS
6.10
x86_64


Archive: sourceguardian/ixed4.lin.x86-64.zip
inflating: /usr/lib64/php/modules/ixed.5.3.lin
Sourceguardian extension found for PHP version 5.3
Sourceguardian extension already in php.ini
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
Checking required prereqs...
Please wait...

OLD VERSION: 5610
Loaded plugins: fastestmirror
Setting up Update Process
Determining fastest mirrors
Error: Cannot find a valid baseurl for repo: base
YumRepo Error: All mirror URLs are not using ftp, http or file.
Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt

Re: Errors Upgrading Nagios XI

Posted: Thu Dec 03, 2020 12:27 pm
by vtrac
Hi ei-admin,
Please make sure that you do have internet connection.
Looks like CentOS 6 has reached End of Life (EOL) in November 30, 2020.
YUM might be attempting connect to deprecated repositories.
So, we need update deprecated repositories URL’s and point to the vault.

Resolution

Code: Select all

To fix this problem you edit /etc/yum.repos.d/CentOS-Base.repo and comment out mirrorlist and replace baseurl with:
baseurl=http://vault.centos.org/6.10/os/$basearch
1. Go to /etc/yum.repos.d/ directory:

Code: Select all

# cd /etc/yum.repos.d/
2. Make copy of original file:

Code: Select all

# cp CentOS-Base.repo CentOS-Base.repo.old
3. Open and edit file with any text editor:

Code: Select all

# vi CentOS-Base.repo


4. After editing it should looks like:

Code: Select all

[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=http://vault.centos.org/6.10/os/$basearch

[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
baseurl=http://vault.centos.org/6.10/updates/$basearch/

[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
baseurl=http://vault.centos.org/6.10/extras/$basearch/

[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
baseurl=http://vault.centos.org/6.10/centosplus/$basearch/
5. Clean yum cache

Code: Select all

# yum clean all
6. Run again yum update command:

Code: Select all

# yum update
Also, please consider update your system from CentOS 6 to CentOS 7 or 8.

Best Regards,
Vinh

Re: Errors Upgrading Nagios XI

Posted: Fri Dec 04, 2020 8:51 pm
by ei-admin
# yum update
Loaded plugins: fastestmirror
Setting up Update Process
Determining fastest mirrors
YumRepo Error: All mirror URLs are not using ftp, http 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


Didn't work ):

Re: Errors Upgrading Nagios XI

Posted: Mon Dec 07, 2020 11:00 am
by vtrac
Hi ei-admin,
Please try edit the file named /etc/yum/pluginconf.d/fastestmirror.conf , run:

Code: Select all

# vi /etc/yum/pluginconf.d/fastestmirror.conf
Find line that read as follows:

Code: Select all

enabled=1
And set it as follows (set enabled to 0):

Code: Select all

enabled=0
Save and close the file. Now run the following yum command:

Code: Select all

# yum clean all
Run again yum update command:

Code: Select all

# yum update
Best Regards,
Vinh

Re: Errors Upgrading Nagios XI

Posted: Mon Dec 07, 2020 12:33 pm
by vtrac
Hi ei-admin,
My teammate has suggest the followings:

Code: Select all

The errors are caused by Centos removing the Centos6 versions of the repositories and moving them to the vault.
What the customer need to do is to permanently disable the "base", "updates" and the "extras" repo's under the "/etc/yum.repos.d/CentOS-Base.repo" by editing the file and setting "enabled=0".

Then they need to edit the  "CentOS-Vault.repo" file and enable the base and updates section and that will remove the errors as the system will be pointing to servers that still exist.

Also, old cached of "mirrorlist.txt" files must be deleted as well:
/var/cache/yum/x86_64/6/base/mirrorlist.txt
/var/cache/yum/x86_64/6/updates/mirrorlist.txt
/var/cache/yum/x86_64/6/extras/mirrorlist.txt
Hope this helps.

Vinh

Re: Errors Upgrading Nagios XI

Posted: Mon Dec 07, 2020 7:25 pm
by ei-admin
Different error now:

YumRepo Error: All mirror URLs are not using ftp, http or file.
Eg. Invalid release/repo/arch combination/
base | 3.7 kB 00:00
base/primary_db | 4.7 MB 00:03
http://mirror.centos.org/centos/6/cr/x8 ... repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
To address this issue please refer to the below wiki article

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.

Error: Cannot retrieve repository metadata (repomd.xml) for repository: cr. Please verify its path and try again




This is what I have down for my centos-base.repo
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$ ... fra=$infra
baseurl=http://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=$ ... fra=$infra
baseurl=http://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=$ ... fra=$infra
baseurl=http://vault.centos.org/6.10/extras/$basearch
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$ ... fra=$infra
baseurl=http://vault.centos.org/6.10/centosplus/$basearch
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$ ... fra=$infra
baseurl=http://mirror.centos.org/centos/$releas ... $basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6



I think we've almost got it!

Re: Errors Upgrading Nagios XI

Posted: Tue Dec 08, 2020 12:17 pm
by vtrac
Hi ei-admin,
You are getting the 404 error because those URL's mirrors were not available (supported) anymore for CentOS 6x.

We want to disable everything inside the "CentOS-Base.repo" and start using the "CentOS-Vault.repo" file for CentOS 6x.

From the list provided in your last reply, looks like not everything in the "CentOS-Base.repo" file were disabled.
I am only seeing "[centosplus]" and "[contrib]" sections were disabled.
We also want the "[Base]", "[Updates]" and "[Extras]" (sections) ALL to be disabled as well.

Code: Select all

Please edit the "CentOS-Base.repo" file again and add "enabled=0" to the "[Base]", "[Updates]" and "[Extras]" sections  ....  Each section must have the "enable=0" set ....  or you can just rename the "CentOS-Base.repo" file to "CentOS-Base.repo.notUse".
Now, start using the "CentOS-Vault.repo":

Code: Select all

Please make sure you set "enabled=1" to ALL the sections inside the "CentOS-Vault.repo" file.

Code: Select all

# yum clean all
# yum update
Hope this helps!!

Vinh

Re: Errors Upgrading Nagios XI

Posted: Wed Dec 09, 2020 11:03 am
by benjaminsmith
HI @ei-admin,

I see you opened a ticket for this issue, # 942312, we'll close out this thread and continue troubleshooting this issue the ticket.

Best Regards,
Benjamin