Re: apt-cacher internal error (died)

2022-09-21 Thread Adam Weremczuk
Thanks David, the server runs 9.2 and clients 9.1 so hopefully it will 
work ok.


Another reason I kept changing sources.list in the client was in the 
aftermath of my recent attempts against apt-cacher.


In apt-cacher you change every line to point to apt-cacher:3142.
At least that's what I have in the legacy config I've inherited.
I'm assuming it worked at some point in the past.

On 21/09/2022 17:49, David Wright wrote:

  "One word of advice: serving to clients running a more recent
   distribution from a server running an older one can cause problems,
   because of minor improvements that are sometimes made in the way
   the archives and the cache are handled and stored."




Re: apt-cacher internal error (died)

2022-09-21 Thread David Wright
On Wed 21 Sep 2022 at 16:26:25 (+0100), Adam Weremczuk wrote:
> On 21/09/2022 15:36, Darac Marjal wrote:
> > I'm no expert in apt-cacher-ng, but the error here says that's
> > it's trying to look up "debian-security" as a hostname. If I'm
> > reading this page
> >  correctly, you
> > shouldn't be changing /etc/apt/sources.list to point to
> > apt-cacher-ng, instead, you should continue to point it to
> > deb.debian.org or snapshot.debian.org and, instead, tell apt to
> > use apt-cacher-ng as an HTTP proxy.
> > 
> > The protocol that a HTTP server and a HTTP proxy use are
> > _slightly_ different. Instead of a client asking a server "Give me
> > /path/to/index.html", it needs to tell the proxy "Give me
> > /path/to/index.html from example.com". I suspect you problem comes
> > of trying to download packages from apt-cacher-ng, rather than
> > proxying through apt-cacher-ng.
> > 
> Thank you Darac, that was my problem indeed!
> What confused me was the fact that, despite being fundamentally
> misconfigured, it appeared to be almost working. Just complaining
> about one security mirror.

It wasn't "fundamentally" misconfigured: you just kept changing
the sources.list in the client when asked not to. Anyway, glad
that it works now.

BTW, obviously we see that you're running at least one machine
on stretch. I couldn't help wondering whether my musings in
  https://lists.debian.org/debian-user/2021/09/msg00305.html
  https://lists.debian.org/debian-user/2021/08/msg00882.html
were related in any way. (I take it you run a mix of versions.)
That's one of the reasons I wrote this advice:

 "One word of advice: serving to clients running a more recent
  distribution from a server running an older one can cause problems,
  because of minor improvements that are sometimes made in the way
  the archives and the cache are handled and stored."

Cheers,
David.



Re: apt-cacher internal error (died)

2022-09-21 Thread Bob Weber

On 9/21/22 10:36, Darac Marjal wrote:



On 21/09/2022 14:07, Adam Weremczuk wrote:

Hi David,

There is still something wrong with my /etc/apt/sources.list

Perhaps caused by stretch reaching end of life on 30 June 2022.

Can somebody provide me with a tested list of mirrors for stretch working in 
Sep 2022 for apt-cacher-ng server and clients?


I've tried several different sets getting no errors from "apt update" on the 
server (which has internet connectivity).


Every time I repeat this list in /etc/apt/sources.list on a client replacing 
FQDN (e.g. deb.debian.org or security.debian.org) with my server's IP and 
port (192.168.100.1:3142) I get DNS errors for security mirror as below:


Err:5 http://192.168.100.1:3142/debian-security stretch/updates Release
  503  DNS error for hostname debian-security: Name or service not known. If 
debian-security refers to a configured cache repository, please check the 
corresponding configuration file.


I'm no expert in apt-cacher-ng, but the error here says that's it's trying to 
look up "debian-security" as a hostname. If I'm reading this page 
 correctly, you shouldn't 
be changing /etc/apt/sources.list to point to apt-cacher-ng, instead, you 
should continue to point it to deb.debian.org or snapshot.debian.org and, 
instead, tell apt to use apt-cacher-ng as an HTTP proxy.


The protocol that a HTTP server and a HTTP proxy use are _slightly_ different. 
Instead of a client asking a server "Give me /path/to/index.html", it needs to 
tell the proxy "Give me /path/to/index.html from example.com". I suspect you 
problem comes of trying to download packages from apt-cacher-ng, rather than 
proxying through apt-cacher-ng.





or

503  DNS error for hostname security: No address associated with hostname.

Perhaps /etc/apt-cacher-ng/acng.conf on the server needs amending as well?

I've found a line there that reads:

Remap-debrep: file:deb_mirror*.gz /debian ; file:backends_debian # Debian 
Archives


Regards,
Adam



On 13/09/2022 05:54, David Wright wrote:

Err:5http://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.


I use apt-cacher-ng also.  The apt proxy is setup in each client with the 
following file:


-- /etc/apt/apt.conf.d/000apt-cacher-ng-proxy

# This configuration snipped is intended to be stored in /etc/apt/apt.conf.d/
# on the client system in order to change a regular setup to use apt-cacher-ng.
#
Acquire::http::Proxy "http://172.16.0.1:3142/";;

# Little optimization. A value of 10 has been used in earlier version of
# apt-get but was disabled in the beginning of the second decade because of
# incompatibilities with certain HTTP proxies. However, it still beneficial
# with proxy servers that support it good enough (like apt-cacher-ng).
#
Acquire::http::Pipeline-Depth "23";

-

That tells apt to use a proxy on the server 172.16.0.1 at port 3142.  The source 
list files remain the same.


Like for testing:

deb http://deb.debian.org/debian/ testing main non-free contrib

apt-cacher-ng can even connect to an external proxy (In setup file) but if it is 
running on a machine that can get to the internet it will not need an additional 
proxy (why waist resources).


This makes apt-cacher-ng work just like the client was connected to the internet 
with the exception of adding the above 000apt-cacher-ng-proxy file being the 
only change needed.


...bob



Re: apt-cacher internal error (died)

2022-09-21 Thread Adam Weremczuk

Thank you Darac, that was my problem indeed!
What confused me was the fact that, despite being fundamentally 
misconfigured, it appeared to be almost working. Just complaining about 
one security mirror.


On 21/09/2022 15:36, Darac Marjal wrote:
I'm no expert in apt-cacher-ng, but the error here says that's it's 
trying to look up "debian-security" as a hostname. If I'm reading this 
page  correctly, you 
shouldn't be changing /etc/apt/sources.list to point to apt-cacher-ng, 
instead, you should continue to point it to deb.debian.org or 
snapshot.debian.org and, instead, tell apt to use apt-cacher-ng as an 
HTTP proxy.


The protocol that a HTTP server and a HTTP proxy use are _slightly_ 
different. Instead of a client asking a server "Give me 
/path/to/index.html", it needs to tell the proxy "Give me 
/path/to/index.html from example.com". I suspect you problem comes of 
trying to download packages from apt-cacher-ng, rather than proxying 
through apt-cacher-ng.






Re: apt-cacher internal error (died)

2022-09-21 Thread Darac Marjal


On 21/09/2022 14:07, Adam Weremczuk wrote:

Hi David,

There is still something wrong with my /etc/apt/sources.list

Perhaps caused by stretch reaching end of life on 30 June 2022.

Can somebody provide me with a tested list of mirrors for stretch 
working in Sep 2022 for apt-cacher-ng server and clients?


I've tried several different sets getting no errors from "apt update" 
on the server (which has internet connectivity).


Every time I repeat this list in /etc/apt/sources.list on a client 
replacing FQDN (e.g. deb.debian.org or security.debian.org) with my 
server's IP and port (192.168.100.1:3142) I get DNS errors for 
security mirror as below:


Err:5 http://192.168.100.1:3142/debian-security stretch/updates Release
  503  DNS error for hostname debian-security: Name or service not 
known. If debian-security refers to a configured cache repository, 
please check the corresponding configuration file.


I'm no expert in apt-cacher-ng, but the error here says that's it's 
trying to look up "debian-security" as a hostname. If I'm reading this 
page  correctly, you 
shouldn't be changing /etc/apt/sources.list to point to apt-cacher-ng, 
instead, you should continue to point it to deb.debian.org or 
snapshot.debian.org and, instead, tell apt to use apt-cacher-ng as an 
HTTP proxy.


The protocol that a HTTP server and a HTTP proxy use are _slightly_ 
different. Instead of a client asking a server "Give me 
/path/to/index.html", it needs to tell the proxy "Give me 
/path/to/index.html from example.com". I suspect you problem comes of 
trying to download packages from apt-cacher-ng, rather than proxying 
through apt-cacher-ng.





or

503  DNS error for hostname security: No address associated with 
hostname.


Perhaps /etc/apt-cacher-ng/acng.conf on the server needs amending as 
well?


I've found a line there that reads:

Remap-debrep: file:deb_mirror*.gz /debian ; file:backends_debian # 
Debian Archives


Regards,
Adam



On 13/09/2022 05:54, David Wright wrote:

Err:5http://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.




OpenPGP_signature
Description: OpenPGP digital signature


Re: apt-cacher internal error (died)

2022-09-21 Thread Adam Weremczuk

Hi David,

There is still something wrong with my /etc/apt/sources.list

Perhaps caused by stretch reaching end of life on 30 June 2022.

Can somebody provide me with a tested list of mirrors for stretch 
working in Sep 2022 for apt-cacher-ng server and clients?


I've tried several different sets getting no errors from "apt update" on 
the server (which has internet connectivity).


Every time I repeat this list in /etc/apt/sources.list on a client 
replacing FQDN (e.g. deb.debian.org or security.debian.org) with my 
server's IP and port (192.168.100.1:3142) I get DNS errors for security 
mirror as below:


Err:5 http://192.168.100.1:3142/debian-security stretch/updates Release
  503  DNS error for hostname debian-security: Name or service not 
known. If debian-security refers to a configured cache repository, 
please check the corresponding configuration file.


or

503  DNS error for hostname security: No address associated with hostname.

Perhaps /etc/apt-cacher-ng/acng.conf on the server needs amending as well?

I've found a line there that reads:

Remap-debrep: file:deb_mirror*.gz /debian ; file:backends_debian # 
Debian Archives


Regards,
Adam



On 13/09/2022 05:54, David Wright wrote:

Err:5http://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.




Re: apt-cacher internal error (died)

2022-09-12 Thread David Wright
On Mon 12 Sep 2022 at 18:57:40 (+0100), Adam Weremczuk wrote:
> On 12/09/2022 16:42, David Wright wrote:
> > On Mon 12 Sep 2022 at 14:33:59 (+0100), Adam Weremczuk wrote:
> > > 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.
> > 
> > I would expect to see lines like:
> > 
> > Get:2 http://security.debian.org/debian-security bullseye-security/main 
> > amd64 libgdk-pixbuf-2.0-0 amd64 2.42.2+dfsg-1+deb11u1 [147 kB]
> > 
> > but with stretch/updates rather than bullseye-security, of course,
> > as the syntax was regularised.
> > 
> > > 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?
> > 
> > AFAIK apt-cacher-ng still needs to make contact with debian-security
> > as part of the process.
> > 
> > > 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
> > 
> > Mine were as attached, with an extra part to security's address.
> > 
> > > 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.
> 
> I've tried your list and the server updates fine.
> 
> On a client I see again:
> 
> sudo apt update
> Ign:1 http://192.168.100.1:3142/debian stretch InRelease
> Ign:2 http://192.168.100.1:3142/debian-security stretch/updates InRelease
> Hit:3 http://192.168.100.1:3142/debian stretch-updates InRelease
> Hit:4 http://192.168.100.1:3142/debian stretch-backports InRelease
> Hit:5 http://192.168.100.1:3142/debian stretch Release
> Err:6 http://192.168.100.1:3142/debian-security stretch/updates Release
>   503  DNS error for hostname debian-security: Name or service not
> known. If debian-security refers to a configured cache repository,
> please check the corresponding configuration file.
> Reading package lists... Done
> E: The repository 'http://192.168.100.1:3142/debian-security
> stretch/updates Release' does not have a Release file.
> N: Updating from such a repository can't be done securely, and is
> therefore disabled by default.
> N: See apt-secure(8) manpage for repository creation and user
> configuration details.
> 
> It looks like there is something wrong with debian-security repo
> specifically.

Did you change your sources.list on the client to make it the same as
the server's?

In case it's not clear, sources.list is not changed for apt-cacher-ng.
You tell it to use the proxy either manually, eg:

# apt-get -o Acquire::http::Proxy="http://192.168.1.14:3142/"; …

of through /etc/apt/apt.conf (or, better, a file in /etc/apt/apt.conf.d/):

Acquire::http::Proxy "http://192.168.1.14:3142/";;

For a laptop, you can turn proxying on and off with the "tricks" shown in
§8.13 of the User Manual in the docs (if it's not the server, of course).

BTW, from what you have posted, it may have escaped you that the
server should also be a client, with its proxy address set to the same
address as all the other clients. That will halve your bandwidth.
Keep that in mind in the penultimate paragraph.

> Could the fact that the client has no internet connectivity play a role?
> I would imagine this is a typical scenario where you want to use apt-cacher.

That implies that neither client nor server have access to the
internet, doesn't it? It's not something I've tried to do as the
internet is effectively always on here, so I'm not certain.

Going right back to the days of dial-up, I played around with apt-move
for a while, but after I had access to Zip® drives and a Jaz® drive,
I just copied /var/cache/apt/archives at work (on Janet) and ran
dpkg -i   at home to install them. (The   apt install ./foo.deb
command wasn't available back then.)

My guess is that most people use apt-cacher-ng as I do, to serve a
nu

Re: apt-cacher internal error (died)

2022-09-12 Thread Adam Weremczuk

Hi David,

I've tried your list and the server updates fine.

On a client I see again:

sudo apt update
Ign:1 http://192.168.100.1:3142/debian stretch InRelease
Ign:2 http://192.168.100.1:3142/debian-security stretch/updates InRelease
Hit:3 http://192.168.100.1:3142/debian stretch-updates InRelease
Hit:4 http://192.168.100.1:3142/debian stretch-backports InRelease
Hit:5 http://192.168.100.1:3142/debian stretch Release
Err:6 http://192.168.100.1:3142/debian-security stretch/updates Release
  503  DNS error for hostname debian-security: Name or service not 
known. If debian-security refers to a configured cache repository, 
please check the corresponding configuration file.

Reading package lists... Done
E: The repository 'http://192.168.100.1:3142/debian-security 
stretch/updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is 
therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user 
configuration details.


It looks like there is something wrong with debian-security repo 
specifically.


Could the fact that the client has no internet connectivity play a role?
I would imagine this is a typical scenario where you want to use apt-cacher.

Regards,
Adam


On 12/09/2022 16:42, David Wright wrote:

On Mon 12 Sep 2022 at 14:33:59 (+0100), Adam Weremczuk wrote:

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.


I would expect to see lines like:

Get:2 http://security.debian.org/debian-security bullseye-security/main amd64 
libgdk-pixbuf-2.0-0 amd64 2.42.2+dfsg-1+deb11u1 [147 kB]

but with stretch/updates rather than bullseye-security, of course,
as the syntax was regularised.


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?


AFAIK apt-cacher-ng still needs to make contact with debian-security
as part of the process.


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


Mine were as attached, with an extra part to security's address.


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.


Cheers,
David.




Re: apt-cacher internal error (died)

2022-09-12 Thread David Wright
On Mon 12 Sep 2022 at 14:33:59 (+0100), Adam Weremczuk wrote:
> 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.

I would expect to see lines like:

Get:2 http://security.debian.org/debian-security bullseye-security/main amd64 
libgdk-pixbuf-2.0-0 amd64 2.42.2+dfsg-1+deb11u1 [147 kB]

but with stretch/updates rather than bullseye-security, of course,
as the syntax was regularised.

> 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?

AFAIK apt-cacher-ng still needs to make contact with debian-security
as part of the process.

> 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

Mine were as attached, with an extra part to security's address.

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

Cheers,
David.
# stretch

# deb cdrom:[Debian GNU/Linux 9.3.0 _Stretch_ - Official amd64 NETINST 
20171209-12:10]/ stretch contrib main non-free

#deb cdrom:[Debian GNU/Linux 9.3.0 _Stretch_ - Official amd64 NETINST 
20171209-12:10]/ stretch contrib main non-free

deb http://ftp.us.debian.org/debian/ stretch main non-free contrib
deb-src http://ftp.us.debian.org/debian/ stretch main non-free contrib

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

# stretch-updates, previously known as 'volatile'
deb http://ftp.us.debian.org/debian/ stretch-updates main contrib non-free
deb-src http://ftp.us.debian.org/debian/ stretch-updates main contrib non-free

# stretch-backports, previously on backports.debian.org
deb http://ftp.us.debian.org/debian/ stretch-backports main contrib non-free
deb-src http://ftp.us.debian.org/debian/ stretch-backports main contrib non-free


Re: apt-cacher internal error (died)

2022-09-12 Thread Adam Weremczuk

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





Re: apt-cacher internal error (died)

2022-09-08 Thread Adam Weremczuk

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





Re: apt-cacher internal error (died)

2022-09-08 Thread David Wright
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,  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.



Re: apt-cacher internal error (died)

2022-09-07 Thread Charles Curley
On Wed, 7 Sep 2022 17:50:16 +0100
Adam Weremczuk  wrote:

> The server runs Debian 9.2 and the client Debian 9.1

I remember having problems with apt-cacher-ng on Debian 9 or
there-abouts. Maybe it's time to upgrade to Bullseye?

apt-cacher-ng has a web server, with which you can do some maintenance.
If I recall correctly, so does apt-cacher. Have you tried running that?
You may need to do it several times.


-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



apt-cacher internal error (died)

2022-09-07 Thread Adam Weremczuk

Hi all,

The server runs Debian 9.2 and the client Debian 9.1

My errors:

CLIENT

$ sudo apt update
Ign:1 http://192.168.1.100:3142/debian stretch InRelease
Hit:2 http://192.168.1.100:3142/debian stretch-updates InRelease
Hit:3 http://192.168.1.100:3142/debian stretch Release
Reading package lists... Done
Building dependency tree
Reading state information... Done
91 packages can be upgraded. Run 'apt list --upgradable' to see them.

$ sudo apt install memtest86+
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  hwtools memtester kernel-patch-badram memtest86 mtools
The following NEW packages will be installed:
  memtest86+
0 upgraded, 1 newly installed, 0 to remove and 91 not upgraded.
Need to get 75.1 kB of archives.
After this operation, 2,448 kB of additional disk space will be used.
Err:1 http://192.168.1.100:3142/debian stretch/main amd64 memtest86+ 
amd64 5.01-3

  502  apt-cacher internal error (died)
E: Failed to fetch 
http://192.168.1.100:3142/debian/pool/main/m/memtest86+/memtest86+_5.01-3_amd64.deb 
 502  apt-cacher internal error (died)
E: Unable to fetch some archives, maybe run apt-get update or try with 
--fix-missing?


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

Any ideas?

Regards,
Adam