Score:0

CentOS 8 upgade - How to resolve Warning: failed loading '/etc/yum.repos.d/CentOS-AppStream.repo', skipping

cn flag

Trying to update my CentOS Linux 8 stack before upgrade to Stream

CentOS Linux 8

[root@den yum.repos.d]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="8 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="8"
[root@den yum.repos.d]# uname -r
4.18.0-147.5.1.el8_1.x86_64

Fix for Failed to download metadata for repo ‘AppStream’

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-*

Errors during downloading metadata for repository 'extras'

YUM

yum clean all
yum update -y
yum check-update
yum update -y

NOTE the WARNING Warning: failed loading '/etc/yum.repos.d/CentOS-AppStream.repo', skipping.

Warning: failed loading '/etc/yum.repos.d/CentOS-AppStream.repo', skipping.
Repository extras is listed more than once in the configuration
CentOS-8 - Base 106 kB/s | 4.6 MB 00:44
CentOS-8 - Base 1.0 kB/s | 8.1 kB 00:08
Errors during downloading metadata for repository 'extras':
- Status code: 404 for https://vault.centos.org/centos/8/updates/x86_64/repodata/repomd.xml (IP: FILTERED)
Error: Failed to download metadata for repo 'extras': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

DNF

rm -rf /var/cache/dnf
dnf update --refresh
Warning: failed loading '/etc/yum.repos.d/CentOS-AppStream.repo', skipping.
Repository extras is listed more than once in the configuration
CentOS-8 - Base                                                                                                                               10 kB/s | 3.9 kB     00:00
CentOS-8 - Base                                                                                                                               23 kB/s | 8.1 kB     00:00
Errors during downloading metadata for repository 'extras':
  - Status code: 404 for https://vault.centos.org/centos/8/updates/x86_64/repodata/repomd.xml (IP: FILTERED)
Error: Failed to download metadata for repo 'extras': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

Any pointers on how to diagnose and resolve this issue?

Score:1
cn flag

Switch from CentOS 8 to Stream 8 instructions are buried under a few clicks on the download page

# Converting from CentOS Linux 8 to CentOS Stream 8                               
dnf --disablerepo '*' --enablerepo extras swap centos-linux-repos centos-stream-repos
dnf distro-sync
                            

Upgrade transaction can work while not being completely up to date.

Do not enable vault, which is for archival only. Leaving it installed encourages the bad practice of using end of life software.

Apparently extras repo survives for 8 and there is where release packages for Stream (and SIGs) live.

Score:0
cn flag

ISSUE RESOLVED

CentOS-Base.repo was "corrupted"

Messed up CentOS-Base.repo

[root@den2-pgstool1 yum.repos.d]# cat CentOS-Base.20220208.bak
# 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.
#
#
[BaseOS]
name=CentOS-$releasever - Base
###mirrorlist=http://##mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra
baseurl=http://vault.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/
baseurl=http://mirrors.kernel.org/$contentdir/$releasever/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
#[BaseOS]
#name=CentOS-$releasever - Base
###mirrorlist=http://##mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra
baseurl=http://vault.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/
#gpgcheck=1
#enabled=1
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
[extras]
name=CentOS-$releasever - Base
###mirrorlist=http://##mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra
baseurl=http://vault.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/
baseurl=http://mirrors.kernel.org/$contentdir/$releasever/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
#[base]
#name=CentOS-$releasever - Base
baseurl=http://vault.centos.org/centos/$releasever/os/$basearch/
#baseurl=https://mirrors.kernel.org/centos/$releasever/os/$basearch/
#baseurl=http://den2-fs1.polycomrp.net/centos/$releasever/os/$basearch/
#proxy=_none_
#gpgcheck=1
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#released updates
#[updates]
#name=CentOS-$releasever - Updates
baseurl=http://vault.centos.org/centos/$releasever/updates/$basearch/
#baseurl=https://mirrors.kernel.org/centos/$releasever/updates/$basearch/
#baseurl=http://den2-fs1.polycomrp.net/centos/$releasever/updates/$basearch/
#proxy=_none_
#gpgcheck=1
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
#[extras]
#name=CentOS-$releasever - Extras
baseurl=http://vault.centos.org/centos/$releasever/extras/$basearch/
#baseurl=https://mirrors.kernel.org/centos/$releasever/extras/$basearch/
#gpgcheck=1
#enabled=0
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#[base]
#name=CentOS-$releasever - Base
baseurl=http://vault.centos.org/centos/$releasever/os/$basearch/
#baseurl=http://mirrors.kernel.org/centos/$releasever/os/$basearch/
#baseurl=http://den2-fs1.polycomrp.net/centos/$releasever/os/$basearch/
#proxy=_none_
#gpgcheck=1
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-8
#released updates
#[updates]
#name=CentOS-$releasever - Updates
baseurl=http://vault.centos.org/centos/$releasever/updates/$basearch/
#baseurl=http://mirrors.kernel.org/centos/$releasever/updates/$basearch/
#baseurl=http://den2-fs1.polycomrp.net/centos/$releasever/updates/$basearch/
#proxy=_none_
#gpgcheck=1
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-8

Manually fixed version

[root@den2-pgstool1 yum.repos.d]# cat CentOS-Base.repo.rpmsave
# 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.
#
[BaseOS]
name=CentOS-$releasever - Base
###mirrorlist=http://##mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra
baseurl=http://vault.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/
#baseurl=http://mirrors.kernel.org/$contentdir/$releasever/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
[extras]
name=CentOS-$releasever - Base
###mirrorlist=http://##mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra
baseurl=http://vault.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/
#baseurl=http://mirrors.kernel.org/$contentdir/$releasever/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.