I'm experiencing the same issues, and my setup is quite similar to Holger's:

* Doing automated/preseeded debian-installer runs (Debian Bullseye),
  inside QEMU on my laptop (Debian Unstable)

* apt-cacher-ng is running on my server
  (Debian Bullseye, ECC RAM, 10GbE, fast M.2 SSD)

* I have a pretty solid Internet connection (FTTB, ~700mbit)

* Laptop uses WiFi which is able to max out the Internet connection

Also seeing a lot of 502 errors from apt-cacher-ng, which breaks the automated
debian-installer runs. Sometimes the connection to apt-cacher-ng just times out,
can't see anything relevant in the apt-cacher-ng log with debugging turned up
to 7. The missing connection simply seems to be overlooked by apt-cacher-ng.

On average, I'd say every second debian-installer run fails.

I've preseeded the d-i runs to use a "normal" ftp.*.debian.org mirror
and not deb.debian.org (using apt-cacher-ng via the mirror/http/proxy
configuration option).

*But*, I've tried backporting apt-cacher-ng from testing/unstable,
meaning that I'm now running 3.7.4-1 instead of 3.6.4-1 on my server.

After that I also purged the cache and restarted apt-cacher-ng:

#!/bin/bash

set -Eeuxo pipefail

CACHEDIR=/var/cache/apt-cacher-ng
LOG_ERR=/var/log/apt-cacher-ng/apt-cacher.err
LOG_LOG=/var/log/apt-cacher-ng/apt-cacher.log

systemctl stop apt-cacher-ng
rm -rf "${CACHEDIR}"
mkdir "${CACHEDIR}"
chown apt-cacher-ng:apt-cacher-ng "${CACHEDIR}"
chmod 2755 "${CACHEDIR}"
rm -f "${LOG_ERR}"
rm -f "${LOG_LOG}"
systemctl start apt-cacher-ng

After that, I've done at least 8-10 successful debian-installer runs
without any problems...

Holger, could you give a backport a try? I'm happy to give you a link
to my backported .deb if you don't want to compile it yourself and if
you're comfortable running executables offered by random strangers :D

Eduard, an official backport (or even an updated package in Bullseye?
not too familiar with what's required for an update) might be a good
idea?

Cheers,
David

Reply via email to