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

**URL:** <https://discuss.elastic.co/t/centos-7-metadata-file-does-not-match-checksum-during-yum-update/284913>\
**Category:** Elasticsearch\
**Created:** [September 22, 2021, 5:15pm UTC](https://discuss.elastic.co/t/centos-7-metadata-file-does-not-match-checksum-during-yum-update/284913 "2021-09-22T17:15:22Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_S](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_s/32/48390_2.png) [@Daniel\_S](https://discuss.elastic.co/u/Daniel_S)\
**Post date:** [September 22, 2021, 5:15pm UTC](https://discuss.elastic.co/t/centos-7-metadata-file-does-not-match-checksum-during-yum-update/284913/1 "2021-09-22T17:15:22Z")

</div>

Hi,

I am getting an error message:

```auto
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](https://sites.google.com/site/kbinstuff/yum-and-proxies) to make sure that it is nothing on my end. Unfortunately, those actions did not help.

```auto
/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

---

<div class="post-metadata">

**Author:** ![jplindquist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jplindquist/32/94945_2.png) [@jplindquist](https://discuss.elastic.co/u/jplindquist)\
**Post date:** [September 22, 2021, 5:44pm UTC](https://discuss.elastic.co/t/centos-7-metadata-file-does-not-match-checksum-during-yum-update/284913/2 "2021-09-22T17:44:24Z")

</div>

We are experiencing the same issue

```auto
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.

```

---

<div class="post-metadata">

**Author:** ![Stef\_Nestor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stef_nestor/32/85483_2.png) [@Stef\_Nestor](https://discuss.elastic.co/u/Stef_Nestor)\
**Post date:** [September 22, 2021, 6:01pm UTC](https://discuss.elastic.co/t/centos-7-metadata-file-does-not-match-checksum-during-yum-update/284913/3 "2021-09-22T18:01:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Lee\_Blackburn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lee_blackburn/32/94946_2.png) [@Lee\_Blackburn](https://discuss.elastic.co/u/Lee_Blackburn)\
**Post date:** [September 22, 2021, 6:01pm UTC](https://discuss.elastic.co/t/centos-7-metadata-file-does-not-match-checksum-during-yum-update/284913/4 "2021-09-22T18:01:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Stef\_Nestor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stef_nestor/32/85483_2.png) [@Stef\_Nestor](https://discuss.elastic.co/u/Stef_Nestor)\
**Post date:** [September 22, 2021, 6:07pm UTC](https://discuss.elastic.co/t/centos-7-metadata-file-does-not-match-checksum-during-yum-update/284913/5 "2021-09-22T18:07:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anthonyneto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anthonyneto/32/94947_2.png) [@anthonyneto](https://discuss.elastic.co/u/anthonyneto)\
**Post date:** [September 22, 2021, 6:13pm UTC](https://discuss.elastic.co/t/centos-7-metadata-file-does-not-match-checksum-during-yum-update/284913/6 "2021-09-22T18:13:13Z")

</div>

Here is a recent test:

```auto
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

```

---

<div class="post-metadata">

**Author:** ![gray-eb](https://avatars.discourse-cdn.com/v4/letter/g/ee7513/32.png) [@gray-eb](https://discuss.elastic.co/u/gray-eb)\
**Post date:** [September 22, 2021, 6:16pm UTC](https://discuss.elastic.co/t/centos-7-metadata-file-does-not-match-checksum-during-yum-update/284913/7 "2021-09-22T18:16:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![betalb](https://avatars.discourse-cdn.com/v4/letter/b/f14d63/32.png) [@betalb](https://discuss.elastic.co/u/betalb)\
**Post date:** [September 22, 2021, 6:17pm UTC](https://discuss.elastic.co/t/centos-7-metadata-file-does-not-match-checksum-during-yum-update/284913/8 "2021-09-22T18:17:40Z")

</div>

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

```auto
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

```

---

<div class="post-metadata">

**Author:** ![Stef\_Nestor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stef_nestor/32/85483_2.png) [@Stef\_Nestor](https://discuss.elastic.co/u/Stef_Nestor)\
**Post date:** [September 22, 2021, 6:19pm UTC](https://discuss.elastic.co/t/centos-7-metadata-file-does-not-match-checksum-during-yum-update/284913/9 "2021-09-22T18:19:29Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![gray-eb](https://avatars.discourse-cdn.com/v4/letter/g/ee7513/32.png) [@gray-eb](https://discuss.elastic.co/u/gray-eb)\
**Post date:** [September 22, 2021, 6:20pm UTC](https://discuss.elastic.co/t/centos-7-metadata-file-does-not-match-checksum-during-yum-update/284913/10 "2021-09-22T18:20:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Stef\_Nestor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stef_nestor/32/85483_2.png) [@Stef\_Nestor](https://discuss.elastic.co/u/Stef_Nestor)\
**Post date:** [September 22, 2021, 6:38pm UTC](https://discuss.elastic.co/t/centos-7-metadata-file-does-not-match-checksum-during-yum-update/284913/11 "2021-09-22T18:38:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![srkiNZ](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@srkiNZ](https://discuss.elastic.co/u/srkiNZ)\
**Post date:** [September 22, 2021, 7:12pm UTC](https://discuss.elastic.co/t/centos-7-metadata-file-does-not-match-checksum-during-yum-update/284913/12 "2021-09-22T19:12:02Z")

</div>

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:

```auto
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).

---

<div class="post-metadata">

**Author:** ![stfischer](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@stfischer](https://discuss.elastic.co/u/stfischer)\
**Post date:** [September 22, 2021, 7:23pm UTC](https://discuss.elastic.co/t/centos-7-metadata-file-does-not-match-checksum-during-yum-update/284913/13 "2021-09-22T19:23:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Stef\_Nestor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stef_nestor/32/85483_2.png) [@Stef\_Nestor](https://discuss.elastic.co/u/Stef_Nestor)\
**Post date:** [September 22, 2021, 7:24pm UTC](https://discuss.elastic.co/t/centos-7-metadata-file-does-not-match-checksum-during-yum-update/284913/14 "2021-09-22T19:24:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Daniel\_S](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_s/32/48390_2.png) [@Daniel\_S](https://discuss.elastic.co/u/Daniel_S)\
**Post date:** [September 22, 2021, 7:53pm UTC](https://discuss.elastic.co/t/centos-7-metadata-file-does-not-match-checksum-during-yum-update/284913/15 "2021-09-22T19:53:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![theredcat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theredcat/32/14164_2.png) [@theredcat](https://discuss.elastic.co/u/theredcat)\
**Post date:** [September 22, 2021, 7:57pm UTC](https://discuss.elastic.co/t/centos-7-metadata-file-does-not-match-checksum-during-yum-update/284913/16 "2021-09-22T19:57:07Z")

</div>

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

```auto
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.

```

---

<div class="post-metadata">

**Author:** ![Stef\_Nestor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stef_nestor/32/85483_2.png) [@Stef\_Nestor](https://discuss.elastic.co/u/Stef_Nestor)\
**Post date:** [September 22, 2021, 8:00pm UTC](https://discuss.elastic.co/t/centos-7-metadata-file-does-not-match-checksum-during-yum-update/284913/17 "2021-09-22T20:00:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Stef\_Nestor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stef_nestor/32/85483_2.png) [@Stef\_Nestor](https://discuss.elastic.co/u/Stef_Nestor)\
**Post date:** [September 22, 2021, 8:15pm UTC](https://discuss.elastic.co/t/centos-7-metadata-file-does-not-match-checksum-during-yum-update/284913/18 "2021-09-22T20:15:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![stfischer](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@stfischer](https://discuss.elastic.co/u/stfischer)\
**Post date:** [September 22, 2021, 8:18pm UTC](https://discuss.elastic.co/t/centos-7-metadata-file-does-not-match-checksum-during-yum-update/284913/19 "2021-09-22T20:18:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![srkiNZ](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@srkiNZ](https://discuss.elastic.co/u/srkiNZ)\
**Post date:** [September 22, 2021, 8:33pm UTC](https://discuss.elastic.co/t/centos-7-metadata-file-does-not-match-checksum-during-yum-update/284913/20 "2021-09-22T20:33:22Z")

</div>

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

Thank you! 🙂

[Next page](https://discuss.elastic.co/t/centos-7-metadata-file-does-not-match-checksum-during-yum-update/284913.md?page=2)
