Koozali.org: home of the SME Server

Contribs.org Forums => Koozali SME Server 10.x => Topic started by: smeghead on July 04, 2024, 06:48:03 AM

Title: Yum fails as Centos 7 is now EOL and mirrorlist.centos.org no longer resolves
Post by: smeghead on July 04, 2024, 06:48:03 AM
This should not be an issue but has been for me on at least 2 servers, one clean install and the other built & then a backup restored, I have several others to check.  Posting this info in case any others encounter this idiosyncrasy.
.
The initial error reported when I run yum (even after yum clean all) is:

Loaded plugins: changelog, fastestmirror, post-transaction-actions, priorities, smeserver
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Name or service not known"

The smeserver-yum rpm has been updated to address this for quite a while but the install/update process for this rpm seems to have failed to run one critical aspect of the update process, namely /etc/e-smith/events/actions/initialize-default-databases, this updates the yum repos to point to the Centos vault (archive).

When I run /etc/e-smith/events/actions/initialize-default-databases manually & then run signal-event yum-modify the yum repos are now updated as expected & yum now works as expected.

In summary, if you have this issue then run the following commands:

To verify you have a yum version that is at least 2.6.0, run:
rpm -q smeserver-yum

If your yum version is older than 2.6.0 then you'll need to download a newer version, the latest yum using wget.  To download the latest version run:

cd /root
wget https://mirrorlist.contribs.org/releases/10.1/smeos/x86_64/Packages/smeserver-yum-2.6.2-1.el7.sme.noarch.rpm

then install this rpm using:

rpm -ivh smeserver-yum-2.6.2-1.el7.sme.noarch.rpm

Once your system has a valid version of smeserver-yum then run:

/etc/e-smith/events/actions/initialize-default-databases
signal-event yum-modify

Yum should now behave as expected.
Title: Re: Yum fails as Centos 7 is now EOL and mirrorlist.centos.org no longer resolves
Post by: Sparkey on July 19, 2024, 03:42:51 PM
Thanks for the info.  I had the same issue.

running:
/etc/e-smith/events/actions/initialize-default-databases

and then:
signal-event yum-modify

mirros can't be found errors are gone. :pint:
Title: Re: Yum fails as Centos 7 is now EOL and mirrorlist.centos.org no longer resolves
Post by: ReetP on July 20, 2024, 11:10:28 PM
This should not be an issue but has been for me on at least 2 servers,

Yum should now behave as expected.

There are lots of posts about this and the causes. You have a rocket account and can see what has been happening if you logged in and read.

For any one wanting to know more.

https://forums.koozali.org/index.php/topic,55196.0.html

https://forums.koozali.org/index.php/topic,55195.0.html

Coalface - several on development, and the reason you have had issues. Almost zero help for the team.

I've tried to let people know.

Eg

https://forums.koozali.org/index.php/topic,55187.0.html

So essentially if people have issues the only person they have to blame is themselves. First for not reading, and second for not helping.

Why didn't they fix the problem? Why is it someone elses job? This is open source. Not a free lunch.

Simple.

We are few. We don't get paid. We have competing priorities in life.

Everyone can help one way or another. Most is simple, monotous & boring. But that's what it takes.

NB If you are a business depending on SME you have zero excuses.......
Title: Re: Yum fails as Centos 7 is now EOL and mirrorlist.centos.org no longer resolves
Post by: Jean-Philippe Pialasse on July 23, 2024, 04:41:54 PM
this should do the job :
Code: [Select]
/etc/e-smith/events/actions/initialize-default-databases
expand-template /etc/yum.smerepos.d/sme-base.repo
and then simply
Code: [Select]
yum update
remember this is to ease migration to next version by getting the last updates before doing so, CentOS 7 remains EOL


addendum if you need to install last version of smeserve-yum to allow access to modified repo do first
Code: [Select]

yum clean all
yum update --disablerepo=* --enablerepo=smeupdates