[Apt-cacher-ng-users] apt-cacher returns error 503, apt-get doesn't retry

Arnaud arnaud at preev.io
Mon Mar 13 04:26:59 UTC 2017


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'
    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.

It seems that apt-get won't retry on an error code 503.

Does apt-cacher always return 503, whatever the network error ? How
could I handle this situation ?

Regards,
Arnaud




More information about the Apt-cacher-ng-users mailing list