CentOS 7: Metadata file does not match checksum during yum update

Hi,

I am getting an error message:

elasticsearch-7.x/primary      FAILED                                          
https://artifacts.elastic.co/packages/7.x/yum/repodata/primary.xml.gz: [Errno -1] Metadata file does not match checksum  

after running "yum update". I tried to clean yum cache and follow instructions in yum and proxies (getting yum to work through a http proxy) - kbinstuff to make sure that it is nothing on my end. Unfortunately, those actions did not help.

/etc/yum.repos.d/elasticsearch.repo 
[elasticsearch]
name=Elasticsearch repository for 7.x packages
baseurl=https://artifacts.elastic.co/packages/7.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md

53f77735744ed4cafdf6e1c7bf5e8714  primary.xml md5sum 

Elasticsearch version 7.9.3

Please advise,
Daniel

We are experiencing the same issue

elasticbeats/primary           FAILED                                                                                          ]  0.0 B/s |    0 B  --:--:-- ETA
https://artifacts.elastic.co/packages/7.x/yum/repodata/primary.xml.gz: [Errno -1] Metadata file does not match checksum        ]  0.0 B/s |    0 B  --:--:-- ETA
Trying other mirror.
elasticbeats/primary                                                                                                                      | 325 kB  00:00:00
https://artifacts.elastic.co/packages/7.x/yum/repodata/primary.xml.gz: [Errno -1] Metadata file does not match checksum
Trying other mirror.

Hello! Thanks for reaching out & apologies for the inconvenience. Our team's currently investigating (id: es#4929) & should have an update soon.

1 Like

Our company is also experiencing the same issue. Issue requesting.
https://artifacts.elastic.co/packages/7.x/yum/repodata/primary.xml.gz

Can you confirm last attempt timestamp? Our team testing just got it to work but suspect an issue about an hour ago while pushing 7.15 live.

Here is a recent test:

docker run -it --rm centos:7 bash                         
[root@3d67fe35cdc5 /]# rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
[root@3d67fe35cdc5 /]# vi /etc/yum.repos.d/elastic.repo
[root@3d67fe35cdc5 /]# yum search logstash
Loaded plugins: fastestmirror, ovl
Determining fastest mirrors
 * base: mirror.sfo12.us.leaseweb.net
 * extras: mirror.san.fastserv.com
 * updates: la.mirrors.clouvider.net
base                                                                                                                                    | 3.6 kB  00:00:00     
elastic-7.x                                                                                                                             | 1.3 kB  00:00:00     
extras                                                                                                                                  | 2.9 kB  00:00:00     
updates                                                                                                                                 | 2.9 kB  00:00:00     
(1/5): base/7/x86_64/group_gz                                                                                                           | 153 kB  00:00:00     
elastic-7.x/primary            FAILED                                          ====                                          ]  0.0 B/s | 4.3 MB  --:--:-- ETA 
https://artifacts.elastic.co/packages/7.x/yum/repodata/primary.xml.gz: [Errno -1] Metadata file does not match checksum      ]  0.0 B/s | 4.3 MB  --:--:-- ETA 
Trying other mirror.
(2/5): extras/7/x86_64/primary_db                                                                                                       | 243 kB  00:00:00     
(3/5): base/7/x86_64/primary_db                                                                                                         | 6.1 MB  00:00:00     
(4/5): updates/7/x86_64/primary_db                                                                                                      |  11 MB  00:00:00     
elastic-7.x/primary                                                                                                                     | 325 kB  00:00:00     
https://artifacts.elastic.co/packages/7.x/yum/repodata/primary.xml.gz: [Errno -1] Metadata file does not match checksum
Trying other mirror.


 One of the configured repositories failed (Elastic repository for 7.x packages),
 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=elastic-7.x ...

     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 elastic-7.x
        or
            subscription-manager repos --disable=elastic-7.x

     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=elastic-7.x.skip_if_unavailable=true

failure: repodata/primary.xml.gz from elastic-7.x: [Errno 256] No more mirrors to try.
https://artifacts.elastic.co/packages/7.x/yum/repodata/primary.xml.gz: [Errno -1] Metadata file does not match checksum
[root@3d67fe35cdc5 /]# date
Wed Sep 22 18:10:44 UTC 2021

+1 We are experiencing the same issue. Thanks for confirming, and we're looking forward to the update.

Debian repository has the same issue compressed Packages list (bz2 & gz) for amd64 are incorrect, uncompressed version is fine

Err:8 https://artifacts.elastic.co/packages/oss-7.x/apt stable/main amd64 Packages
  File has unexpected size (65376 != 65301). Mirror sync in progress? [IP: 34.120.127.130 443]
  Hashes of expected file:
   - Filesize:65301 [weak]
   - SHA512:356b55765764330806699e742d8c321a7be907af112a54ec162be02d12f7894b04141a9bc5fa4d042145e393d3010f95741a7e18947196d6f27b1152b5642bcf
   - SHA256:b8ab3ffb0df533a6dd209c1b4c85224b456953b6f2fe77a1a78782cfa63833dd
   - SHA1:0e9604feca249a1c3739ddb547342296c56991c6 [weak]
   - MD5Sum:03971439aace87cc571c5721748874c1 [weak]
  Release file created at: Wed, 15 Sep 2021 19:42:34 +0000
1 Like

Thanks for the updates of ongoing & our apologies. Re-pinged Dev. For any updates, kindly also post time attempted so we can keep appraised on recency :slight_smile:

Our issues began around 10AM CDT and are ongoing. Latest attempt ~1 minute ago.

1 Like

I have Elastic Infra currently investigating. AFAIK issue is YUM/APT Linux installations (w/caveat above that uncompressed may work). Kindly update if anyone notices other installation methods that started experiencing issues w/in the last hour/so.

2 Likes

We are also seeing the issue with APT trying to install FileBeat. From an AWS EC2 instance in the Sydney (ap-southeast-2) region, running Ubuntu 20.04:

Failed to update apt cache: 
E:Failed to fetch https://artifacts.elastic.co/packages/oss-7.x/apt/dists/stable/main/binary-amd64/Packages.bz2
  File has unexpected size (65376 != 65301). Mirror sync in progress? [IP: 34.120.127.130 443]
Hashes of expected file:
 - Filesize:65301 [weak]
 - SHA512:356b55765764330806699e742d8c321a7be907af112a54ec162be02d12f7894b04141a9bc5fa4d042145e393d3010f95741a7e18947196d6f27b1152b5642bcf
 - SHA256:b8ab3ffb0df533a6dd209c1b4c85224b456953b6f2fe77a1a78782cfa63833dd
 - SHA1:0e9604feca249a1c3739ddb547342296c56991c6 [weak]
 - MD5Sum:03971439aace87cc571c5721748874c1 [weak]
Release file created at: Wed, 15 Sep 2021 19:42:34 +0000
, E:Some index files failed to download. They have been ignored, or old ones used instead.

Problem was noticed by us approximately one hour ago (6AM NZST).

I am seeing this now at 12:22 PM PDT with both APT and YUM.

We believe we've pinpointed the issue & are working to mitigate. I'm hoping we'll be ready for y'all to re-test in about 30mins.

3 Likes

YUM/CentOS7: Problem is gone, It works for me now. Thank You @Stef_Nestor!

1 Like

Still KO from aws eu-west-1 on debian mirror

Get:7 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 Packages [78.8 kB]
Err:7 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 Packages
  File has unexpected size (78886 != 78795). Mirror sync in progress? [IP: 34.120.127.130 443]
  Hashes of expected file:
   - Filesize:78795 [weak]
   - SHA512:6a31510a68ed4ec43116053445bcae3e01e8aee5a0a91115d33106751aa07803260f9e7c8de356cc6e80ca3225f2f60280de694cb59e0bbb9654de3149a2147b
   - SHA256:33e8f2fba7c5914d6bae8741560b4f12874e7bd655dfc7eaa73c93ed80837707
   - SHA1:41ff70e24888210b61ddf373af05076563e69e82 [weak]
   - MD5Sum:d6ea4093e04c8575814315b36e7174f6 [weak]
  Release file created at: Wed, 15 Sep 2021 21:37:54 +0000
Get:8 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 Contents (deb) [2816 kB]
Err:8 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 Contents (deb)
  
Reading package lists... Done       
E: Failed to fetch https://artifacts.elastic.co/packages/7.x/apt/dists/stable/main/binary-amd64/Packages.bz2  File has unexpected size (78886 != 78795). Mirror sync in progress? [IP: 34.120.127.130 443]
   Hashes of expected file:
    - Filesize:78795 [weak]
    - SHA512:6a31510a68ed4ec43116053445bcae3e01e8aee5a0a91115d33106751aa07803260f9e7c8de356cc6e80ca3225f2f60280de694cb59e0bbb9654de3149a2147b
    - SHA256:33e8f2fba7c5914d6bae8741560b4f12874e7bd655dfc7eaa73c93ed80837707
    - SHA1:41ff70e24888210b61ddf373af05076563e69e82 [weak]
    - MD5Sum:d6ea4093e04c8575814315b36e7174f6 [weak]
   Release file created at: Wed, 15 Sep 2021 21:37:54 +0000
E: Failed to fetch https://artifacts.elastic.co/packages/7.x/apt/dists/stable/main/Contents-amd64.gz  
E: Some index files failed to download. They have been ignored, or old ones used instead.

Yes, I like progress! Hopefully the APT fix is still just in its pipeline loading.

If anyone attempting YUM still has errors, kindly note timestamp & host/location.

1 Like

Infra's reporting APT should also be fixed. I'm testing. Can I have a user confirmation as well?

1 Like

Thanks for the fix. Both YUM and APT seem to be working now for me.

1 Like

APT update/install from EC2 instance in AWS Sydney region (ap-southeast-2) is now working.

Thank you! :slight_smile:

1 Like