Broken apt repo

I’m getting this error when running apt update on ubuntu 20.04. This started occuring on Tuesday, which seems to line up with the timestamp of ‘Release file created at’ in the error message. Is there an issue with a file that was uploaded to apt for the focal distro?

Err:19 http://repo.percona.com/percona/apt focal/main i386 Packages
  File has unexpected size (20 != 414). Mirror sync in progress? [IP: 147.135.54.159 80]
  Hashes of expected file:
   - Filesize:414 [weak]
   - SHA256:13a18235d61ea537e96a21d90971e705d370190e5087f57038f08ab67d3931fc
   - SHA1:08d96e7c684f047684ac5bfab5fa126fb0332144 [weak]
   - MD5Sum:a1296098f80a1e48f9a27ae9ad90ff5b [weak]
  Release file created at: Tue, 26 Dec 2023 19:28:52 +0000
Get:20 http://repo.percona.com/percona/apt focal/main amd64 Packages [20.0 kB]
Fetched 42.5 kB in 3s (14.7 kB/s)                   
Reading package lists... Done
E: Failed to fetch http://repo.percona.com/percona/apt/dists/focal/main/binary-i386/Packages.gz  File has unexpected size (20 != 414). Mirror sync in progress? [IP: 147.135.54.159 80]
   Hashes of expected file:
    - Filesize:414 [weak]
    - SHA256:13a18235d61ea537e96a21d90971e705d370190e5087f57038f08ab67d3931fc
    - SHA1:08d96e7c684f047684ac5bfab5fa126fb0332144 [weak]
    - MD5Sum:a1296098f80a1e48f9a27ae9ad90ff5b [weak]
   Release file created at: Tue, 26 Dec 2023 19:28:52 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.

After some further digging I found that this error was only happening when the ‘original’ repo was being used with the percona-release tool. Since I only needed proxysql2, I switched it to that repo instead with the following command and no longer receive the error:

percona-release enable-only proxysql

The docs for using percona-release can be found here:

You can find the repo names to choose from here:

I tried to reproduce the issue but without success.
What I suggest doing in this situation:

  1. Clear the APT Cache:
  • Run sudo apt-get clean to clear out the local repository of retrieved package files. It removes everything from /var/cache/apt/archives/ and /var/cache/apt/archives/partial/.
  1. Update the Package Lists:
  • Run sudo apt-get update to update the list of available packages and their versions, but it does not install or upgrade any packages.

We have the same issue. We’re are using the following repositories:

# cat /etc/apt/sources.list.d/repo_percona_com_*
deb http://repo.percona.com/apt focal main
deb-src http://repo.percona.com/apt focal main
deb http://repo.percona.com/tools/apt focal main
deb-src http://repo.percona.com/tools/apt focal main

Following @Evgeniy_Patlan 's procedure does not fix the problem

The interesting thing is that we don’t have the issue on all our machines

We have the same problem as stated here. This seems to be related to the repository for Ubuntu focal.
I looked in the repository and it seems that it is probably wrongly uploaded.

If I check : https://repo.percona.com/percona/apt/dists/focal/Release

It stated :

Origin: Percona Development Team
Label: percona
Codename: focal
Version: 1.0
Date: Tue, 26 Dec 2023 19:28:52 UTC
Architectures: x86_64 amd64 i386 i686
Components: main experimental testing laboratory
Description: Percona repository
MD5Sum:

a1296098f80a1e48f9a27ae9ad90ff5b 414 main/binary-i386/Packages.gz

But file itself in : Percona Repo
has size 20.
Packages.gz 20 B 2023-Dec-22 22:58

1 Like

Yes we have this exact issue as described by @wolf_fg. The Packages file is 0 bytes (should be 610 according the the Release file) and Packages.gz is a 20 byte zip (should be 414).

I think the wrong Packages file has been used + uploaded.

The URL https://repo.percona.com/apt/dists/focal/Release lists (among others):

 29501ac8a22131eb92d9e8a4f756ebd9 610 main/binary-x86_64/Packages
 a1296098f80a1e48f9a27ae9ad90ff5b 414 main/binary-x86_64/Packages.gz
 cd1f1310ac787ae228a73440f1c4acde 130 main/binary-x86_64/Release

But the actual contents of the directory https://repo.percona.com/apt/dists/focal/main/binary-x86_64/ are:

Packages	0 B	2023-Dec-22 22:58
Packages.gz	20 B	2023-Dec-22 22:58
Release	130 B	2023-Dec-22 22:58