Err:6 http://apt.postgresql.org/pub/repos/apt bionic-pgdg/main amd64 Packages
File has unexpected size (261012 != 261548). Mirror sync in progress? [IP:34.96.81.152 80]
Hashes of expected file:
- Filesize:261548 [weak]
- SHA256:37a20f862843d0ea2ca9178efdd7f46cd8fcbe85926304893f4a9f891633a302
- SHA1:fe531e043053fc60a816800b5e85f38dd757eba2 [weak]
- MD5Sum:e5525fc956ea8b3cce5512b2605dc3c7 [weak]
Release file created at: Mon, 26 Aug 2019 12:54:57 +0000
Get:7 http://apt.postgresql.org/pub/repos/apt bionic-pgdg/main i386 Packages [261 kB]
Fetched 88.7 kB in 1s (161 kB/s)
Reading package lists...
E: Failed to fetch http://apt.postgresql.org/pub/repos/apt/dists/bionic-pgdg/main/binary-amd64/Packages.gz File has unexpected size (261012 != 261548). Mirror sync in progress? [IP: 34.96.81.152 80]
Hashes of expected file:
- Filesize:261548 [weak]
- SHA256:37a20f862843d0ea2ca9178efdd7f46cd8fcbe85926304893f4a9f891633a302
- SHA1:fe531e043053fc60a816800b5e85f38dd757eba2 [weak]
- MD5Sum:e5525fc956ea8b3cce5512b2605dc3c7 [weak]
Release file created at: Mon, 26 Aug 2019 12:54:57 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.
The command "sudo apt-get update" failed and exited with 100 during .
Your build has been stopped.
Sometimes, rerunning failed build solves the problem.
We are seeing similar issues for postgresql packages with the Xenial image, this morning:
Get:58 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-backports/universe Translation-en [4,428 B]
Fetched 52.0 MB in 5s (9,564 kB/s)
Reading package lists...
E: Failed to fetch http://apt.postgresql.org/pub/repos/apt/dists/xenial-pgdg/main/binary-amd64/Packages Writing more data than expected (790354 > 789362)
E: Some index files failed to download. They have been ignored, or old ones used instead.
travis_time:end:00f70d60:start=1566830908143179564,finish=1566830920312008614,duration=12168829050
e[0Ke[31;1mThe command "sudo ./travis/install_base.sh" failed and exited with 100 during .e[0m
Iâve tried clearing local Travis caches, and it doesnât help. Weâve tried 7 or 8 rebuilds with no resolution.
This issue seems to have resolved itself for us. Donât know if somebody stepped in and changed anything⌠or not, but our builds are now completing the ./travis/install_base.sh script without any problems.
The problem here seems to be that Travis is adding a caching layer on top of apt.postgresql.org that we (PostgreSQL.org) donât control. The mentioned IP 34.96.81.152 is not part of the PostgreSQL infrastructure. So whoever added that layer on the Travis side should make sure they got the mirror sync correct.
I can confirm that weâre hitting someone elseâs server (cache proxy) inside TravisCI, and not the source apt.postgresql.org (apt.postgresql.org resolves to 72.32.157.246 on travis, and to 204.145.124.244 on my computer)
so, if you really really need to, you could add this in the before_install phase, at the expense of potentially slower transfers: âecho âapt.postgresql.org 204.145.124.244â | sudo tee -a /etc/hosts; sudo apt-get cleanâ
The upstream reports that they cannot migrate to the by-hash mirror scheme because the repo generating software that they use doesnât support it. It appears that a grant is available to implement that feature. See https://redmine.postgresql.org/issues/4679 for details.
So, the options currently are:
Disable Travisâ caching (this would only mitigate the problem)
Implement the by-hash scheme at the Travisâ mirror privately
since the upstream repo is impossible to sync reliably, weâd have to integrity-check the result before making it available (though a mirroring software that supports syncing from âunreliableâ repos should be able to do this automatically)
Implement the above-mentioned feature so the upstream can use it â then the transparent mirror can be left unchanged
We are still seeing this issue on ppc64le environments:
E: Failed to fetch http://apt.postgresql.org/pub/repos/apt/dists/xenial-pgdg/main/binary-ppc64el/Packages.gz Hash Sum mismatch
196E: Some index files failed to download. They have been ignored, or old ones used instead.
197Failed at 15: sudo -E apt update
198The command ".ci/setup.sh" failed and exited with 100 during .
@j0k3r Sorry to hear this happened again. Do you have a link to that build where this happened today? If itâs from a private build, could you please send it over to support [AT] travis-ci [DOT] com. Thanks!