#1151217#5
Date:
2026-10-18 10:22:37 UTC
From:
To:
apt-cacher won't stop immediately (in Debian testing) on

dpkg -l | grep apt-cacher
ii  apt-cacher    1.7.34
  all  Caching proxy server for Debian/Ubuntu/Devuan software repositories

$ systemctl stop apt-cacher

The log contains some messages like this one during stopping:

$ journalctl -f -u apt-cacher
...
Okt 18 11:32:10 xxxxx apt-cacher[2359]: Unable to bind socket (port 3142), trying again in 5 seconds.
...

A test during the 5 seconds who blocks the port delivers the following:

$ ss -tulpn | grep 3142
tcp   LISTEN 0  4096  *:3142  *:*  users:(("apt-cacher",pid=2615,fd=7))

This also happens during a (then slowed down) shutdown of the machine. I think here the sercice runs nearly/often in the 90sec default timeout.

Thanks.

Chris