Re: [squid-users] Squid transparent not caching apt requests from deb.debian.org

2020-04-10 Thread zrm
On 4/8/20 13:13, Matus UHLAR - fantomas wrote: On 08.04.20 13:01, zrm wrote: I checked the DNS query apt is making to see why it's different. It's making a SRV query for _http._tcp.deb.debian.org and then using the IP address of the name (prod.debian.map.fastly.net) returned in the SRV query.

Re: [squid-users] Squid transparent not caching apt requests from deb.debian.org

2020-04-08 Thread Matus UHLAR - fantomas
On 4/7/20 8:48 PM, zrm wrote: https://www.trustiosity.com/squid/cache-debug.log.xz On 4/8/20 10:46, Alex Rousskov wrote: I found the reason for the difference. After the destination IP address of your apt requests fails Host header validation, Squid marks the request as "not cachable": On

Re: [squid-users] Squid transparent not caching apt requests from deb.debian.org

2020-04-08 Thread zrm
On 4/8/20 10:46, Alex Rousskov wrote: On 4/7/20 8:48 PM, zrm wrote: https://www.trustiosity.com/squid/cache-debug.log.xz I found the reason for the difference. After the destination IP address of your apt requests fails Host header validation, Squid marks the request as "not cachable": I

Re: [squid-users] Squid transparent not caching apt requests from deb.debian.org

2020-04-08 Thread Alex Rousskov
On 4/7/20 8:48 PM, zrm wrote: > https://www.trustiosity.com/squid/cache-debug.log.xz I found the reason for the difference. After the destination IP address of your apt requests fails Host header validation, Squid marks the request as "not cachable": > hostHeaderIpVerify: IP 151.101.248.204:80

Re: [squid-users] Squid transparent not caching apt requests from deb.debian.org

2020-04-07 Thread zrm
cache.log for apt-apt-wget-wget with squid -k debug: https://www.trustiosity.com/squid/cache-debug.log.xz On 4/6/20 11:49, Alex Rousskov wrote: On 4/4/20 8:02 PM, zrm wrote: Attached cache.log excerpt for wget-wget-apt-apt-wget-wget. It answers the apt requests from the cache once it's in

Re: [squid-users] Squid transparent not caching apt requests from deb.debian.org

2020-04-06 Thread Amos Jeffries
On 7/04/20 3:49 am, Alex Rousskov wrote: > On 4/4/20 8:02 PM, zrm wrote: >> Attached cache.log excerpt for wget-wget-apt-apt-wget-wget. It answers >> the apt requests from the cache once it's in there, it just won't cache >> it to begin with when apt makes the request > > Thank you for sharing

Re: [squid-users] Squid transparent not caching apt requests from deb.debian.org

2020-04-06 Thread Alex Rousskov
On 4/4/20 8:02 PM, zrm wrote: > Attached cache.log excerpt for wget-wget-apt-apt-wget-wget. It answers > the apt requests from the cache once it's in there, it just won't cache > it to begin with when apt makes the request Thank you for sharing this log. I agree with your conclusion. The apt

Re: [squid-users] Squid transparent not caching apt requests from deb.debian.org

2020-04-04 Thread zrm
On 4/4/20 10:53, Alex Rousskov wrote: The headers you have posted tell us that the object was not in Squid cache when apt and wget transactions started. Since wget was started after apt, we can speculate that apt transaction did not cache the object. This is consistent with your observations. I

Re: [squid-users] Squid transparent not caching apt requests from deb.debian.org

2020-04-04 Thread Amos Jeffries
On 5/04/20 2:53 am, Alex Rousskov wrote: > On 4/3/20 4:55 PM, zrm wrote: >> On 4/3/20 16:34, Alex Rousskov wrote: >>> On 4/3/20 4:26 PM, zrm wrote: In the first case we get TCP_MISS every time because it isn't caching the data, in the second case it's only the first time and after that

Re: [squid-users] Squid transparent not caching apt requests from deb.debian.org

2020-04-04 Thread Alex Rousskov
On 4/3/20 4:55 PM, zrm wrote: > On 4/3/20 16:34, Alex Rousskov wrote: >> On 4/3/20 4:26 PM, zrm wrote: >>> In the first case we get TCP_MISS every time because it isn't caching >>> the data, in the second case it's only the first time and after that we >>> get TCP_REFRESH_UNMODIFIED. But how and

Re: [squid-users] Squid transparent not caching apt requests from deb.debian.org

2020-04-03 Thread zrm
On 4/3/20 16:34, Alex Rousskov wrote: On 4/3/20 4:26 PM, zrm wrote: In the first case we get TCP_MISS every time because it isn't caching the data, in the second case it's only the first time and after that we get TCP_REFRESH_UNMODIFIED. But how and why is this happening? Those questions can

Re: [squid-users] Squid transparent not caching apt requests from deb.debian.org

2020-04-03 Thread Alex Rousskov
On 4/3/20 4:26 PM, zrm wrote: > In the first case we get TCP_MISS every time because it isn't caching > the data, in the second case it's only the first time and after that we > get TCP_REFRESH_UNMODIFIED. But how and why is this happening? Those questions can often be answered by looking at HTTP

Re: [squid-users] Squid transparent not caching apt requests from deb.debian.org

2020-04-03 Thread Antony Stone
On Friday 03 April 2020 at 22:26:13, zrm wrote: > Greetings! Today I bring you a Squid cache mystery. > In the first case we get TCP_MISS every time because it isn't caching > the data, in the second case it's only the first time and after that we > get TCP_REFRESH_UNMODIFIED. But how and why is

[squid-users] Squid transparent not caching apt requests from deb.debian.org

2020-04-03 Thread zrm
Greetings! Today I bring you a Squid cache mystery. I configured a simple transparent proxy to cache package downloads for Debian, using Squid on Debian 10. When apt clients download packages from deb.debian.org, Squid says TCP_MISS, downloads the package, and then doesn't cache it. The