[Apt-cacher-ng-users] apt-cacher returns error 503, apt-get doesn't retry
Eduard Bloch
edi at gmx.de
Fri Mar 17 20:19:06 UTC 2017
Hallo,
* Arnaud [Mon, Mar 13 2017, 11:26:59AM]:
> Dear apt-cacher-ng,
>
> I use apt-cacher-ng to build a Debian live system. The whole build
> process takes a while and download a fairly big amount of data, most of
> it through `apt-get`. In this situation, apt-cacher is a must.
>
> However I'm facing problems, because I work from a place with a poor
> connectivity, and experience network failures quite often. Often enough
> so that there's always at least one network failure during the whole
> build process.
>
> My current attempt to improve the situation is simply to run apt-get
> with the option `-oAcquire::Retries=1`, for example. However, I don't
> get the expected behavior.
>
> If I run apt-get WITHOUT apt-cacher, I clearly see apt-get retrying,
> showing that I'm doing it right. The logs look like that:
>
> Err http://ftp.us.debian.org/debian/ jessie/main htop amd64 1.0.3-1
> Could not resolve 'ftp.us.debian.org'
> Err http://ftp.us.debian.org/debian/ jessie/main htop amd64 1.0.3-1
> Could not resolve 'ftp.us.debian.org'
What does "retrying" mean here? I guess it's trying to get the Release
file instead of InRelease because the later failed.
> E: Failed to fetch
> http://ftp.us.debian.org/debian/pool/main/h/htop/htop_1.0.3-1_amd64.deb
> Could not resolve 'ftp.us.debian.org'
>
> If I run apt-get WITH apt-cacher, apt-get doesn't retry though. The logs
> look like that.
>
> Err http://ftp.us.debian.org/debian/ jessie/main htop amd64 1.0.3-1
> 503 DNS error for hostname ftp.us.debian.org: Name or service not
> known. If ftp.us.debian.org refers to a configured cache repository,
> please check the corresponding configuration file.
> E: Failed to fetch
> http://ftp.us.debian.org/debian/pool/main/h/htop/htop_1.0.3-1_amd64.deb
> 503 DNS error for hostname ftp.us.debian.org: Name or service not
> known. If ftp.us.debian.org refers to a configured cache repository,
> please check the corresponding configuration file.
How is the client configuration? Set as proxy? Then it would be not a
network error but a remote server error, which might be handled
differently by apt.
> It seems that apt-get won't retry on an error code 503.
>
> Does apt-cacher always return 503, whatever the network error ?
apt-cacher-ng can obviously not fake network errors, i.e. to look the
same as natural ones.
> How
> could I handle this situation ?
Fix your network. acng has a DNS cache and you might increase its
expiration period but something will still be failing.
Regards,
Eduard.
More information about the Apt-cacher-ng-users
mailing list