I try to set up apt-cacher-ng to cache all apt packages for the local network. But with the graylog repository I have some trouble.
System: Debian 9 with apt 1.4.0 and apt-cacher-ng 2-2
On a server I just configured apt to use the apt-cacher server as a proxy (this is the only server with internet connection) with a line in /etc/apt/apt.conf.d/01proxy:
Acquire::http { Proxy "10.10.10.10:3142"; };
Now all apt-get updates and upgrades are getting their packages from the apt-cacher server. This works fine. Also I can just use a https repository using HTTPS/// in the URL like described in the manual.
The source.list looks like this:
deb http://HTTPS///artifacts.elastic.co/packages/5.x/apt stable main
deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main
deb http://HTTPS///packages.graylog2.org/repo/debian/ stable 2.5
The output of "apt-get update" on the server ends with:
Err:13 http://HTTPS///packages.graylog2.org/repo/debian stable/2.5 amd64 Packages 406 Not Acceptable
Ign:14 http://HTTPS///packages.graylog2.org/repo/debian stable/2.5 all Packages Reading package lists...
W: The repository 'http://HTTPS///packages.graylog2.org/repo/debian stable Release' does not have a Release file.
E: Failed to fetch http://HTTPS///packages.graylog2.org/repo/debian/dists/stable/2.5/binary-amd64/Packages 406 Not Acceptable
E: Some index files failed to download. They have been ignored, or old ones used instead.
In the apt-cacher-ng log the error is:
1548752476|I|224|10.10.10.10|packages.graylog2.org/repo/debian/dists/stable/2.5/binary-all/Packages [HTTP error, code: 406]
1548752476|E|237|10.10.10.10|packages.graylog2.org/repo/debian/dists/stable/2.5/binary-all/Packages [HTTP error, code: 406]
When I enable tunneling with PassThroughPattern in the /etc/apt-cacher-ng/acng.conf, the traffic is not cached but updates will work. Which isn’t the goal here, but shows that the network traffic should be working on my site. This can be used if caching is not needed or optional:
PassThroughPattern: (packages\.graylog2\.org|graylog2-package-repository\.s3\.amazonaws\.com):443$
Any help is highly appreciated.