Hash mismatch

Hi everybody,

Everytime I run sudo apt-get update I get a hash mismatch regarding this file:

http://apt.osmc.tv/dists/jessie/main/binary-armhf/Packages

Could it be a temporary issue? I waited for several hours and still can not run a simple update.

Thanks.

Had to wait since yesterday myself, just stay calm, to me it seems that the apt-mirrors need longer to update themselves as intended right now…
Try again later, It’ll work!

Try again now

We are suffering persistent mirror replication issues, so I have now fallen back to a single mirror. Updates will be significantly slower, but will consistently work.

This is not a sign of error with your device, but due to high reports of this error (and confusion amongst users) we have now disabled mirrordirection so users do not think something is wrong.

There existed an issue where updating within a 2-3 minute timeframe from a push could cause a Hash Sum Mismatch error. We have now addressed this, although downloads and updates will now be much slower until it is dealt with properly.

Thanks both of you. It is certainly solved. I could update this morning with the only issue of the connections speed.

The connection speed is slower as our mirror system is now falling back to a single mirror

Is this still not resolved? Every time there is an update I get “Update failed” on the GUI, so now I took it to SSH to see why:

osmc@vero4kp:~$ sudo apt update
Hit:1 ht tp://security.debian.org stretch/updates InRelease
Ign:3 ht tp://ftp.debian.org/debian stretch InRelease
Hit:4 ht tp://ftp.debian.org/debian stretch-updates InRelease
Hit:5 ht tp://ftp.debian.org/debian stretch Release
Get:2 ht tp://ftp.fau.de/osmc/osmc/apt stretch InRelease [4682 B]
Get:7 ht tp://ftp.fau.de/osmc/osmc/apt stretch/main armhf Packages.diff/Index [2023 B]
Get:8 ht tp://ftp.fau.de/osmc/osmc/apt stretch/main arm64 Packages.diff/Index [2023 B]
Get:10 ht tp://ftp.fau.de/osmc/osmc/apt stretch/main arm64 Packages [11.7 kB]
Get:9 ht tp://103.1.138.206/ftp.fau.de/osmc/osmc/apt stretch/main armhf Packages [25.1 kB]
Err:9 ht tp://103.1.138.206/ftp.fau.de/osmc/osmc/apt stretch/main armhf Packages

  • Hash Sum mismatch*
  • Hashes of expected file:*
    • Filesize:25083 [weak]*
    • SHA256:447888d9faa915906a22471c0add1bd8770493cfd911502eb658fa3c91697f5c*
    • SHA1:813e239a7c7966724f694320d985653c817eafca [weak]*
    • MD5Sum:1f757c8ba6d959e75a7c1d58645b1b0c [weak]*
  • Hashes of received file:*
    • SHA256:065771950f0ff6a11fa74ff98d8eb9e8ff73b884d8e09f170518ac630c4366e0*
    • SHA1:b95c2f44db61d14a95284046309c2d46c1ca84bb [weak]*
    • MD5Sum:64c1a0cfd3ea59d8b9b507106b811d2b [weak]*
    • Filesize:24817 [weak]*
  • Last modification reported: Sun, 16 Feb 2020 12:37:09 +0000*
  • Release file created at: Tue, 24 Mar 2020 22:00:57 +0000*
    Fetched 29.5 kB in 2s (14.6 kB/s)
    Reading package lists… Done
    E: Failed to fetch http://103.1.138.206/ftp.fau.de/osmc/osmc/apt/dists/stretch/main/binary-armhf/Packages.gz Hash Sum mismatch
  • Hashes of expected file:*
    • Filesize:25083 [weak]*
    • SHA256:447888d9faa915906a22471c0add1bd8770493cfd911502eb658fa3c91697f5c*
    • SHA1:813e239a7c7966724f694320d985653c817eafca [weak]*
    • MD5Sum:1f757c8ba6d959e75a7c1d58645b1b0c [weak]*
  • Hashes of received file:*
    • SHA256:065771950f0ff6a11fa74ff98d8eb9e8ff73b884d8e09f170518ac630c4366e0*
    • SHA1:b95c2f44db61d14a95284046309c2d46c1ca84bb [weak]*
    • MD5Sum:64c1a0cfd3ea59d8b9b507106b811d2b [weak]*
    • Filesize:24817 [weak]*
  • Last modification reported: Sun, 16 Feb 2020 12:37:09 +0000*
  • Release file created at: Tue, 24 Mar 2020 22:00:57 +0000*
    E: Some index files failed to download. They have been ignored, or old ones used instead.
    Eventually it resolves, but I am still keen to understand why do I need to wait days, even a week for this to eventually get fixed?
    (I had to break https manually because “new users can have max 5 links in a post :man_facepalming:t4:”)

The last post is four years old. We have not had reports since.

It sounds like an HTTP proxy on your network causing issues.

No proxy, unless my service provider does any transparent proxying.

It’s possible. You could use the HTTPS mirror instead.

Which is quite possible nowadays.
What does wget -qO- ftp.fau.de/osmc/osmc/apt/dists/stretch/main/binary-armhf/Packages.gz | sha256sum gives you

How? I have tested from my own W10 notebook: (WSL Ubuntu)
sape@X1G7:~$ curl http://103.1.138.206/ftp.fau.de/osmc/osmc/apt/dists/stretch/main/binary-armhf/Packages.gz --output Packages.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 24817 100 24817 0 0 932k 0 --:–:-- --:–:-- --:–:-- 969k
sape@X1G7:~$ sha256sum Packages.gz
065771950f0ff6a11fa74ff98d8eb9e8ff73b884d8e09f170518ac630c4366e0 Packages.gz
a.k.a. the wrong SHA256 this way too

Actually http://103.1.138.206 seems to be a server from your provider that is playing fool.

sape@X1G7:~$ wget -qO- ftp.fau.de/osmc/osmc/apt/dists/stretch/main/binary-armhf/Packages.gz | sha256sum
065771950f0ff6a11fa74ff98d8eb9e8ff73b884d8e09f170518ac630c4366e0 -

Indeed, that IP isn’t an OSMC mirror, so his traffic is clearly being intercepted by his ISP.

Hmm, having switched over to wifi from my mobile hotspot:
sape@X1G7:~$ wget -qO- ftp.fau.de/osmc/osmc/apt/dists/stretch/main/binary-armhf/Packages.gz | sha256sum
065771950f0ff6a11fa74ff98d8eb9e8ff73b884d8e09f170518ac630c4366e0 -
sape@X1G7:~$ wget -qO- ftp.fau.de/osmc/osmc/apt/dists/stretch/main/binary-armhf/Packages.gz | sha256sum
447888d9faa915906a22471c0add1bd8770493cfd911502eb658fa3c91697f5c -
sape@X1G7:~$
So the only questions is how can I get around of this transparent proxy? Should not work for HTTPS right (they cannoy fake the cert for your domain)?

E.g. change it in some file under /etc/apt/something?

You need to have a package apt-transport-https installed.

See if it’s there:

dpkg -l apt-transport-https

Should be in by default now

Ok. Wasn’t aware of that.

osmc@vero4kp:~$ dpkg -l apt-transport-https
dpkg-query: no packages found matching apt-transport-https
Was not, but just apt installed it.