Switching to apt-cacher-ng brings no immediate joy :(

CLIENT (192.168.100.243)
sudo apt update
Err:5 http://192.168.100.1:3142/security stretch/updates Release
503 DNS error for hostname security: No address associated with hostname. If security refers to a configured cache repository, please check the corresponding configuration file. E: The repository 'http://192.168.100.1:3142/security stretch/updates Release' does not have a Release file.

SERVER (192.168.100.1)
1662988978|E|769|192.168.100.243|security/dists/stretch/updates/InRelease [HTTP error, code: 503]
1662988978|M|Download of security/dists/stretch/updates/Release aborted

Why a DNS error if I use IPs internally for this exercise?

Is there something wrong with sources.list on the SERVER:

deb http://ftp.uk.debian.org/debian stretch main contrib non-free
deb-src http://ftp.uk.debian.org/debian stretch main contrib non-free
deb http://security.debian.org/ stretch/updates main contrib non-free
deb-src http://security.debian.org/ stretch/updates main contrib non-free

sudo apt update
Ign:1 http://ftp.uk.debian.org/debian stretch InRelease
Ign:2 http://hwraid.le-vert.net/debian stretch InRelease
Hit:3 http://ftp.uk.debian.org/debian stretch Release
Get:4 http://security.debian.org stretch/updates InRelease [59.1 kB]
Fetched 59.1 kB in 0s (119 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
381 packages can be upgraded. Run 'apt list --upgradable' to see them.

?

Thanks,
Adam


On 08/09/2022 19:12, Adam Weremczuk wrote:
Hi David,

 From SERVER:/etc/apt-cacher/apt-cacher.conf

user = www-data
group = www-data

sudo chown -R www-data:www-data /var/cache/apt/archives/*

Same error on the CLIENT :(

I think I'll give apt-cacher-ng a shot instead although I wouldn't mind knowing why apt-cacher keeps failing.

Regards,
Adam

On 08/09/2022 16:28, David Wright wrote:
Disclaimer: I run apt-cacher-ng, and have never looked at apt-cacher.

On Wed 07 Sep 2022 at 17:50:16 (+0100), Adam Weremczuk wrote:

SERVER

Wed Sep  7 17:06:40 2022|error [10088]: Failed to open/create
/var/cache/apt-cacher/packages/memtest86+_5.01-3_amd64.deb for return:
Permission denied at /usr/sbin/apt-cacher line 735, <GEN13> line 4.
Wed Sep  7 17:07:58 2022|warn [20848]: Warning: unable to close
filehandle __ANONIO__ properly: Bad file descriptor at
/usr/sbin/apt-cacher line 1539.

Permissions seem fine:

ls -al /var/cache/apt-cacher/packages/memtest86+_5.01-3_amd64.deb
lrwxrwxrwx 1 proxy proxy 51 Aug 22 18:13
/var/cache/apt-cacher/packages/memtest86+_5.01-3_amd64.deb ->
/var/cache/apt/archives/memtest86+_5.01-3_amd64.deb

ls -al /var/cache/apt/archives/memtest86+_5.01-3_amd64.deb
-rw-r--r-- 1 myuser users 75142 Nov 18  2021
/var/cache/apt/archives/memtest86+_5.01-3_amd64.deb

All folders in both paths are 755.

I don't understand the commingling of apt-cacher and apt; is this
how apt-cacher is designed to work? When I install a new package
on a client, the server does not use /var/cache/apt/archives/,
but only its /var/cache/apt-cacher/ directories, from which it
will serve clients.

If someone was logged in to a client and installing package foo,
and I happened to be logged in to the server and installing foo
directly (not via apt-cacher), it would appear from your logs
that we'd both be trying to use the same directory. How would
the permissions work then, and if I cleaned apt's cache, where
would apt-cacher serve the deleted foo file from?

BTW Who is myuser and who is apt-cacher running as?

Cheers,
David.


Reply via email to