Package: apt-cacher-ng
Version: 3.7.4-1+b2
Severity: normal

Dear Maintainer,

Hello,

Recently Spotify's package repository started dropping connections partway
through. You can (hopefully) see this in action via something like:

  wget -t1 
http://repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_1.2.26.1187.g36b715a1_amd64.deb

The connection will usually get closed partway through the response.

Without a proxy configured, apt will successfully resume the interrupted
download. However, with the proxy (apt-cacher-ng) enabled, the download
restarts from the beginning, and because the whole file never downloads
successfully in one go, it hits apt's retry count. This usually means I
don't get any updates at all, and unfortunate situation.

apt-cacher.log looks like:

  1704535981|M|Download of 
repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_1.2.26.1187.g36b715a1_amd64.deb
 started
  
1704535986|I|2275168|192.168.1.42|repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_1.2.26.1187.g36b715a1_amd64.deb
 [HTTP error, code: 503]
  
1704535986|E|2274227|192.168.1.42|repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_1.2.26.1187.g36b715a1_amd64.deb
 [HTTP error, code: 503]
  1704535989|M|Download of 
repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_1.2.26.1187.g36b715a1_amd64.deb
 started
  
1704536008|I|74935484|192.168.1.42|repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_1.2.26.1187.g36b715a1_amd64.deb
 [HTTP error, code: 503]
  
1704536008|E|74934543|192.168.1.42|repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_1.2.26.1187.g36b715a1_amd64.deb
 [HTTP error, code: 503]
  1704536013|M|Download of 
repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_1.2.26.1187.g36b715a1_amd64.deb
 started
  
1704536018|I|2087284|192.168.1.42|repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_1.2.26.1187.g36b715a1_amd64.deb
 [HTTP error, code: 503]
  
1704536018|E|2086343|192.168.1.42|repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_1.2.26.1187.g36b715a1_amd64.deb
 [HTTP error, code: 503]

Running apt with -o Debug::Acquire::http=true reveals that apt requests a
byte range, but apt-cacher-ng responds with the whole file anyway.

I guess apt-cacher-ng doesn't support Range requests on the client side? I
expect it's because it doesn't want to have to deal with partial files from
upstream, but I suppose apt-cacher-ng's HTTP client could do with some retry
logic (involving Range requests on the upstream) similar to wget's?

-- Package-specific info:

-- System Information:
Debian Release: 12.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 
'oldstable-updates'), (500, 'oldstable-security'), (500, 
'oldoldstable-updates'), (500, 'oldoldstable-debug'), (500, 'oldoldstable'), 
(500, 'stable'), (500, 'oldstable'), (490, 'testing'), (460, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 6.1.0-15-686-pae (SMP w/1 CPU thread; PREEMPT)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages apt-cacher-ng depends on:
ii  adduser                    3.134
ii  debconf [debconf-2.0]      1.5.82
ii  dpkg                       1.21.22
ii  libbz2-1.0                 1.0.8-5+b1
ii  libc-ares2                 1.18.1-3
ii  libc6                      2.36-9+deb12u3
ii  libevent-2.1-7             2.1.12-stable-8
ii  libevent-pthreads-2.1-7    2.1.12-stable-8
ii  libfuse2                   2.9.9-6+b1
ii  libgcc-s1                  12.2.0-14
ii  liblzma5                   5.4.1-0.2
ii  libssl3                    3.0.11-1~deb12u2
ii  libstdc++6                 12.2.0-14
ii  libsystemd0                252.19-1~deb12u1
ii  libwrap0                   7.6.q-32
ii  lsb-base                   11.6
ii  sysvinit-utils [lsb-base]  3.06-4
ii  zlib1g                     1:1.2.13.dfsg-1

Versions of packages apt-cacher-ng recommends:
ii  ca-certificates  20230311

Versions of packages apt-cacher-ng suggests:
ii  avahi-daemon  0.8-10
pn  doc-base      <none>

-- Configuration Files:
/etc/apt-cacher-ng/security.conf [Errno 13] Permission denied: 
'/etc/apt-cacher-ng/security.conf'

-- debconf information:
* apt-cacher-ng/tunnelenable: false
* apt-cacher-ng/gentargetmode: Set up now and update later
* apt-cacher-ng/bindaddress: apt-cache
* apt-cacher-ng/proxy: keep
* apt-cacher-ng/cachedir: keep
* apt-cacher-ng/port: keep

Reply via email to