Reputation: 1
I need to find a solution to cache google-chrome-stable deb files with apt-cacher-ng, because I work in a large VMs enviroment and connection is slow. Each time that apt update downloads the updates, it takes very long time due to large number of clients and slow connection.
apt-cache-ng seems resolved almost all, and is caching all other updates requested with APT by clients.
The only problem is remaining on google updates. Log of apt-cacher-ng shows that they are served thru the cache, but in realty the client downloads from remote server again and again. I don't understand where is the problem.
Proxy logs (with debug enabled):
1737630512|I|112534706|192.168.17.148|dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_132.0.6834.110-1_amd64.deb 1737630512|O|112534196|192.168.17.148|dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_132.0.6834.110-1_amd64.deb 1737630567|I|490|192.168.17.148|dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_132.0.6834.110-1_amd64.deb 1737630567|O|2586431|192.168.17.148|dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_132.0.6834.110-1_amd64.deb 1737630758|I|490|192.168.17.148|dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_132.0.6834.110-1_amd64.deb 1737630758|O|109876658|192.168.17.148|dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_132.0.6834.110-1_amd64.deb 1737630828|I|490|192.168.17.148|dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_132.0.6834.110-1_amd64.deb 1737630828|O|3271372|192.168.17.148|dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_132.0.6834.110-1_amd64.deb
**Logs of client APT action: **
`sudo apt -o Debug::Acquire::http=true install --reinstall google-chrome-stable Reading package lists... Done Building dependency tree... Done Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 22 not upgraded. Need to get 113 MB of archives. After this operation, 0 B of additional disk space will be used. 0% [Working]GET http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_132.0.6834.110-1_amd64.deb HTTP/1.1 Host: dl.google.com Cache-Control: no-cache Pragma: no-cache User-Agent: Debian APT-HTTP/1.3 (2.4.13) non-interactive
Answer for: http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_132.0.6834.110-1_amd64.deb HTTP/1.1 200 OK Content-Type: octet/stream Last-Modified: Tue, 21 Jan 2025 20:12:57 GMT Content-Length: 112533840 X-Original-Source: http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_132.0.6834.110-1_amd64.deb Date: Thu, 23 Jan 2025 11:13:45 GMT Server: Debian Apt-Cacher NG/3.7.4
Get:1 http://dl.google.com/linux/chrome/deb stable/main amd64 google-chrome-stable amd64 132.0.6834.110-1 [113 MB] 2% [1 google-chrome-stable 2.214 kB/113 MB 2%]`
As you can see, even if server shows as "debian APT-Cacher NG/3.7.4" (looks to be correct), the client goes to download the file again from remote location.
It's not HTTPS issue because the file is served thru HTTP standard protocol.
Note: if I make request of the same file thru WGET, it is served by proxy correctly. So, wget and apt have different behaviour with the same file. it's even more strange.
Any help to sort out this issue?
Thanks in advance to all.
export http_proxy="http://192.168.17.166:3142"
`wget -O /dev/null http://192.168.17.166:3142/dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_132.0.6834.110-1_amd64.deb --2025-01-23 11:33:40-- http://192.168.17.166:3142/dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_132.0.6834.110-1_amd64.deb Connecting to 192.168.17.166:3142... connected. HTTP request sent, awaiting response... 200 OK Length: 112533840 (107M) [octet/stream] Saving to: ‘/dev/null’
/dev/null 100%[=================================================>] 107,32M 26,5MB/s in 4,2s
2025-01-23 11:33:44 (25,7 MB/s) - ‘/dev/null’ saved [112533840/112533840] `
Upvotes: 0
Views: 32