yesterday I did the updates on a few servers, everything went through and looked good but today I get something like this:
[root@infra01 ~]# yum clean all && rm -rf /var/cache/yum && yum -y update
Loaded plugins: changelog, fastestmirror, nethserver_events
Cleaning repos: base centos-sclo-rh centos-sclo-sclo epel extras nethforge nethserver-base nethserver-updates updates
Cleaning up everything
Maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos
Cleaning up list of fastest mirrors
Loaded plugins: changelog, fastestmirror, nethserver_events
Determining fastest mirrors
epel/x86_64/metalink | 14 kB 00:00:00
* base: ftp.tugraz.at
* epel: mirror.miletic.net
* extras: ftp.tugraz.at
* nethforge: mrmarkuz.goip.de
* nethserver-base: mrmarkuz.goip.de
* nethserver-updates: mrmarkuz.goip.de
* updates: ftp.tugraz.at
base | 3.6 kB 00:00:00
centos-sclo-rh | 3.0 kB 00:00:00
centos-sclo-sclo | 2.9 kB 00:00:00
epel | 4.7 kB 00:00:00
extras | 3.4 kB 00:00:00
nethforge | 4.1 kB 00:00:00
nethserver-base | 2.9 kB 00:00:00
nethserver-updates | 4.1 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/14): base/7/x86_64/group_gz | 166 kB 00:00:00
(2/14): epel/x86_64/group_gz | 84 kB 00:00:00
epel/x86_64/updateinfo FAILED ] 0.0 B/s | 669 kB --:--:-- ETA
http://mirror.23media.de/epel/7/x86_64/repodata/3ada5bcbccaa9772074a773b15bd01dd48e753a184ebecfed590de6c389ada03-updateinfo.xml.bz2: [Errno 14] HTTP 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/.
(3/14): centos-sclo-sclo/x86_64/primary_db | 202 kB 00:00:00
(4/14): extras/7/x86_64/primary_db | 104 kB 00:00:00
(5/14): nethforge/7/x86_64/group_gz | 1.7 kB 00:00:00
(6/14): nethserver-base/7/x86_64/primary_db | 241 kB 00:00:00
(7/14): nethserver-updates/7/x86_64/group_gz | 20 kB 00:00:00
(8/14): epel/x86_64/primary_db | 1.6 MB 00:00:01
(9/14): nethserver-updates/7/x86_64/primary_db | 382 kB 00:00:00
(10/14): base/7/x86_64/primary_db | 5.9 MB 00:00:02
(11/14): nethforge/7/x86_64/primary_db | 32 kB 00:00:01
(12/14): updates/7/x86_64/primary_db | 1.0 MB 00:00:01
(13/14): epel/x86_64/updateinfo | 921 kB 00:00:00
(14/14): centos-sclo-rh/x86_64/primary_db | 3.2 MB 00:00:03
One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=<repoid> ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable <repoid>
or
subscription-manager repos --disable=<repoid>
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
file is encrypted or is not a database
How can I be sure that everything will be ok with the server?
Yesterday I upgraded 2 production servers on bare metal. Now I think what to do now, usually the updates ns does not lead to such sad consequences.
# yum clean all && rm -rf /var/cache/yum && yum -y update
Loaded plugins: changelog, fastestmirror, nethserver_events
Cleaning repos: base centos-sclo-rh centos-sclo-sclo collaboraoffice.com_repos_CollaboraOnline_CODE-centos7 epel extras
: nethforge nethserver-base nethserver-updates remi-php56 remi-safe updates veeam
Cleaning up everything
Maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos
Cleaning up list of fastest mirrors
Loaded plugins: changelog, fastestmirror, nethserver_events
Determining fastest mirrors
epel/x86_64/metalink | 16 kB 00:00:00
Could not retrieve mirrorlist http://mirrorlist.nethserver.org/7/nethserver?release=7&repo=nethforge&arch=x86_64 error was
12: Timeout on http://mirrorlist.nethserver.org/7/nethserver?release=7&repo=nethforge&arch=x86_64: (28, 'Connection timed out after 30001 milliseconds')
One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=<repoid> ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable <repoid>
or
subscription-manager repos --disable=<repoid>
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
Cannot find a valid baseurl for repo: nethforge/7/x86_64
You have new mail in /var/spool/mail/root
Any idea how to fix this now? I have 1 server on distance 900 km. Jet in great need of repair…
EPEL failures are quite common and are due to mirror synchronizations. The YUM client should fall back to another mirror and solve the problem. I can’t figure out why it failed. Did you try again?
# curl -v 'http://mirrorlist.nethserver.org/7/nethserver?release=7&repo=nethforge&arch=x86_64'
* About to connect() to mirrorlist.nethserver.org port 80 (#0)
* Trying 159.89.233.254...
64 bytes from 8.8.8.8: icmp_seq=7 ttl=56 time=1.93 ms
64 bytes from 8.8.8.8: icmp_seq=8 ttl=56 time=1.83 ms
64 bytes from 8.8.8.8: icmp_seq=9 ttl=56 time=2.60 ms
64 bytes from 8.8.8.8: icmp_seq=10 ttl=56 time=1.99 ms
64 bytes from 8.8.8.8: icmp_seq=11 ttl=56 time=2.63 ms
64 bytes from 8.8.8.8: icmp_seq=12 ttl=56 time=2.89 ms
64 bytes from 8.8.8.8: icmp_seq=13 ttl=56 time=2.70 ms
64 bytes from 8.8.8.8: icmp_seq=14 ttl=56 time=2.65 ms
64 bytes from 8.8.8.8: icmp_seq=15 ttl=56 time=2.80 ms
^C
— 8.8.8.8 ping statistics —
15 packets transmitted, 9 received, 40% packet loss, time 14013ms
rtt min/avg/max/mdev = 1.833/2.449/2.893/0.390 ms
12:54:04 root@es jobs:0 cmd:891 /root
One of the configured repositories failed (Unknown),
and yum doesn’t have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work “fix” this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=<repoid> ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable <repoid>
or
subscription-manager repos --disable=<repoid>
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
[root@vm5 ~]# host mirrorlist.nethserver.org
mirrorlist.nethserver.org is an alias for packages.nethserver.org.
packages.nethserver.org has address 159.89.233.254