Control Web Panel

WebPanel => CentOS 8 Problems => Topic started by: Radical Redemption on July 16, 2024, 08:19:00 AM

Title: Could not resolve host: mirrorlist.centos.org
Post by: Radical Redemption on July 16, 2024, 08:19:00 AM
Hello, I recently started to get this error.

Code: [Select]
######################
Update Server Packages
######################
Errors during downloading metadata for repository 'appstream':
  - Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8-stream&arch=x86_64&repo=AppStream&infra=stock [Could not resolve host: mirrorlist.centos.org]
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8-stream&arch=x86_64&repo=AppStream&infra=stock [Could not resolve host: mirrorlist.centos.org]
Redirecting to /bin/systemctl restart cwpsrv.service
Redirecting to /bin/systemctl restart httpd.service
Redirecting to /bin/systemctl reload httpd.service
Job for httpd.service failed.
See "systemctl status httpd.service" and "journalctl -xe" for details.
Redirecting to /bin/systemctl reload nginx.service
Redirecting to /bin/systemctl reload httpd.service
Redirecting to /bin/systemctl restart httpd.service

Date which backup script is using: 2024-07-15 01:21:27

Also, from the yum manager there is one available CentOs update that can't be updated and it's been like this for more than a month.

(https://i.gyazo.com/35a96be2af59feab744b833c47bba650.png)

(https://i.gyazo.com/c0f9bb1f1b40c2ee4f795b0c0d3ae932.png)
Title: Re: Could not resolve host: mirrorlist.centos.org
Post by: overseer on July 16, 2024, 03:10:56 PM
CentOS 8 Stream is EOL -- more & more mirrors are being archived & taken offline. Please migrate to AlmaLinux 8 (or another supported OS).
Title: Re: Could not resolve host: mirrorlist.centos.org
Post by: Starburst on July 16, 2024, 07:57:41 PM
Agreed, CentOS Stream 8 went EOL before CentOS 7 actually did.

Mirrors have removed those repos to save space to current OS's.

That's why it was never recommended to run a beta OS like Stream, or an alpha OS like Fedora for production servers.

You can manually edit your repo and see if putting vault. at the beginning works, but it's not guaranteed.

Also see:
https://kb.starburstservices.com/common-issues/could-not-resolve-host-mirrorlist-centos-org-on-centos-stream-8/ (https://kb.starburstservices.com/common-issues/could-not-resolve-host-mirrorlist-centos-org-on-centos-stream-8/)

Title: Re: Could not resolve host: mirrorlist.centos.org
Post by: Radical Redemption on July 17, 2024, 06:51:08 AM
Dayum, I have so much configuration and stuff on this server, migration will probably have to be manual, I guess I will have to start over with a fresh install..
Title: Re: Could not resolve host: mirrorlist.centos.org
Post by: Radical Redemption on July 17, 2024, 07:01:09 AM
Is it possible to upgrade to AlmaLinux from current Centos 8 Stream without losing any configuration and data?
Title: Re: Could not resolve host: mirrorlist.centos.org
Post by: overseer on July 17, 2024, 09:25:50 AM
https://linuxiac.com/centos-8-to-almalinux-8-migration-guide/ (https://linuxiac.com/centos-8-to-almalinux-8-migration-guide/)
Title: Re: Could not resolve host: mirrorlist.centos.org
Post by: Starburst on July 17, 2024, 06:14:36 PM
Official site & guides to migrate to AlmaLinux.

https://almalinux.org/elevate/ (https://almalinux.org/elevate/)
Title: Re: Could not resolve host: mirrorlist.centos.org
Post by: Starburst on July 17, 2024, 06:16:27 PM
Dayum, I have so much configuration and stuff on this server, migration will probably have to be manual, I guess I will have to start over with a fresh install..

Best is bring up another server, and use the CWP -> CWP Migration Tool.
Title: Re: Could not resolve host: mirrorlist.centos.org
Post by: Radical Redemption on July 25, 2024, 06:17:48 AM
https://linuxiac.com/centos-8-to-almalinux-8-migration-guide/ (https://linuxiac.com/centos-8-to-almalinux-8-migration-guide/)

That is not for Stream tho, will it work?
Title: Re: Could not resolve host: mirrorlist.centos.org
Post by: overseer on July 25, 2024, 08:40:23 PM
I don't have any direct experience with it, since I am on the CentOS 7 -> AlmaLinux ELevate track. Did you try what Starburst recommended? (Back up your server FIRST -- full image!)
Title: Re: Could not resolve host: mirrorlist.centos.org
Post by: hallbook Network on July 27, 2024, 02:43:33 AM
Hi,

mirrorlist.centos.org doesn't exists anymore.

From the .repo file:

# 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.
To resolve the issue you can mass update all .repo files:

sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo

sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

Bye Bye!
Title: Re: Could not resolve host: mirrorlist.centos.org
Post by: Radical Redemption on July 28, 2024, 06:09:02 AM
Hi,

mirrorlist.centos.org doesn't exists anymore.

From the .repo file:

# 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.
To resolve the issue you can mass update all .repo files:

sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo

sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

Bye Bye!

This helped, thanks a lot!
Title: Re: Could not resolve host: mirrorlist.centos.org
Post by: Geky on October 08, 2024, 06:42:24 PM
Hi,

mirrorlist.centos.org doesn't exists anymore.

From the .repo file:

# 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.
To resolve the issue you can mass update all .repo files:

sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo

sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

Bye Bye!


Gracias hermano me ayudó demasiado.
Title: Re: Could not resolve host: mirrorlist.centos.org
Post by: sappurit on March 20, 2025, 06:37:40 PM
Thank. I used these 3 commands

Code: [Select]
sed -i s/mirror.centos.org/vault.centos.org/g  /etc/yum.repos.d/CentOS-*
sed -i s/^#baseurl=http/baseurl=http/g         /etc/yum.repos.d/CentOS-*
sed -i s/^mirrorlist=http/#mirrorlist=http/g   /etc/yum.repos.d/CentOS-*