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
<https://help.ubuntu.com/community/Apt-Cacher%20NG> 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