<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Aptos;
panose-1:2 11 0 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:12.0pt;
font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Aptos",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-GB" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">And, just to confirm.. if I change public.server.fqdn to that my blog (macmule.com).. I can curl down a file from that via squid-cache fine:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">curl -D -
<a href="https://local.server.fqdn/AutoCasperNBI-AppCast.xml">https://local.server.fqdn/AutoCasperNBI-AppCast.xml</a> -o /dev/null
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"> % Total % Received % Xferd Average Speed Time Time Time Current<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"> Dload Upload Total Spent Left Speed<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"> 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0HTTP/1.1 200 OK<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">Date: Fri, 12 Jul 2024 11:04:24 GMT<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">Server: Apache<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">Last-Modified: Sat, 04 May 2019 13:21:20 GMT<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">ETag: "69d9d-75b7-5880fbe2c1400"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">Accept-Ranges: bytes<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">Content-Length: 30135<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">Vary: Accept-Encoding<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">Content-Type: application/xml<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">Age: 21285<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">Cache-Status: local.server;hit;detail=match<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">Via: 1.1 local.server (squid/6.6)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">Connection: keep-alive<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">100 30135 100 30135 0 0 96335 0 --:--:-- --:--:-- --:--:-- 96277<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">So the issue seems to be caching content that requires authentication, hence saying the issues seems to be what is stated at:
<a href="https://serverfault.com/questions/1104330/squid-cache-items-behind-basic-authentication">
https://serverfault.com/questions/1104330/squid-cache-items-behind-basic-authentication</a><o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black;mso-fareast-language:EN-US">The question here is, can squid cache items that require authentication to access?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black;mso-fareast-language:EN-US">Regards,
<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black;mso-fareast-language:EN-US">Ben.
</span><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div id="mail-editor-reference-message-container">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="color:black">From:
</span></b><span style="color:black">Ben Toms <ben@macmule.com><br>
<b>Date: </b>Friday, 12 July 2024 at 17:56<br>
<b>To: </b>Alex Rousskov <rousskov@measurement-factory.com>, squid-users@lists.squid-cache.org <squid-users@lists.squid-cache.org><br>
<b>Subject: </b>Re: [squid-users] TCP_MISS_ABORTED/502<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">So, with the below config:</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">https_port 443 accel protocol=HTTPS tls-cert=/usr/local/squid/client.pem tls-key=/usr/local/squid/client.key</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">cache_peer public.server.fqdn parent 443 0 no-query originserver no-digest no-netdb-exchange tls login=PASSTHRU name=myAccel forceddomain=public.server.fqdn</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">acl our_sites dstdomain local.server.fqdn</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">http_access allow our_sites</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">cache_peer_access myAccel allow our_sites</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">cache_peer_access myAccel deny all</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">cache_dir ufs /usr/local/squid/var/cache 100000 16 256</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">cache_mem 500 MB</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">maximum_object_size_in_memory 50000 KB</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">refresh_pattern . 0 20% 4320</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">debug_options 11,2</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I can see the below in /var/log/squid/cache.log</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">----------</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">2024/07/12 16:49:57.056 kid1| 11,2| http.cc(1263) readReply: conn12 local=client.ip:56670 remote=public.ip.of.public.server:443 FIRSTUP_PARENT FD 14 flags=1: read failure: (0) No error.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">2024/07/12 16:49:57.056 kid1| 11,2| Stream.cc(273) sendStartOfMessage: HTTP Client conn9 local=client.ip:443 remote=local.server.ip:59158 FD 13 flags=1</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">2024/07/12 16:49:57.056 kid1| 11,2| Stream.cc(274) sendStartOfMessage: HTTP Client REPLY:</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">---------</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">HTTP/1.1 502 Bad Gateway</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Server: squid/6.6</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Mime-Version: 1.0</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Date: Fri, 12 Jul 2024 16:49:57 GMT</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Content-Type: text/html;charset=utf-8</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Content-Length: 3629</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">X-Squid-Error: ERR_READ_ERROR 0</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Vary: Accept-Language</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Content-Language: en</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Cache-Status: local.server;detail=mismatch</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Via: 1.1 local.server (squid/6.6)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Connection: keep-alive</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">----------</span><o:p></o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">The apache server still shows a 200 for the request:</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">[12/Jul/2024:17:49:57 +0100] "GET /path/to/file HTTP/1.1" 200 10465 "-" "curl/8.7.1"</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">And this is when testing via:</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">curl -D -
<a href="https://local.server.fqdn/path/to/file">https://local.server.fqdn/path/to/file</a> -H "Authorization: Basic base64auth" -o /dev/null</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Regards,
</span><o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Ben.
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<div id="mail-editor-reference-message-container">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="color:black">From:
</span></b><span style="color:black">Alex Rousskov <rousskov@measurement-factory.com><br>
<b>Date: </b>Friday, 12 July 2024 at 17:36<br>
<b>To: </b>Ben Toms <ben@macmule.com>, squid-users@lists.squid-cache.org <squid-users@lists.squid-cache.org><br>
<b>Subject: </b>Re: [squid-users] TCP_MISS_ABORTED/502</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt">On 2024-07-12 12:14, Ben Toms wrote:<br>
<br>
> Which log should those be found?<br>
<br>
cache.log (if they are present)<br>
<br>
<br>
> Can’t see “HTTP Server RESPONSE” in the access.log or cache.log.<br>
<br>
Sigh. This is one of the reasons I avoid asking folks to study logs <br>
themselves, even ALL,2 logs...<br>
<br>
If that line is not in cache.log, then child Squid probably did not <br>
receive a response from parent Squid, or could not parse that response. <br>
A full debugging log should give us more information.<br>
<br>
Alex.<br>
<br>
<br>
> *From: *squid-users <squid-users-bounces@lists.squid-cache.org> on <br>
> behalf of Alex Rousskov <rousskov@measurement-factory.com><br>
> *Date: *Friday, 12 July 2024 at 17:11<br>
> *To: *squid-users@lists.squid-cache.org <squid-users@lists.squid-cache.org><br>
> *Subject: *Re: [squid-users] TCP_MISS_ABORTED/502<br>
> <br>
> On 2024-07-12 11:38, Ben Toms wrote:<br>
>> Think I made the changes Alex requested:<br>
>> <br>
>> 12/Jul/2024:15:36:31 +0000.640 local.server.ip TCP_MISS_ABORTED/502 3974 <br>
>> GET <a href="https://local.server.fqdn/path/to/file">https://local.server.fqdn/path/to/file</a>
<br>
> <<a href="https://local.server.fqdn/path/to/file">https://local.server.fqdn/path/to/file</a>> -<br>
>> FIRSTUP_PARENT/public.ip.of.public.server text/html <br>
>> ERR_READ_ERROR/WITH_SERVER<br>
> <br>
> Thank you for using Squid v6 for this test.<br>
> <br>
> Unfortunately, due to Squid logging bugs, ERR_READ_ERROR/WITH_SERVER<br>
> does not always mean what it says. For example, parent Squid could have<br>
> closed the child-parent connection prematurely, but there could be other<br>
> reasons. A full debugging log should give us more information.<br>
> <br>
> <br>
>> 2024/07/12 14:57:08.678 kid1| 11,2| Stream.cc(274) sendStartOfMessage: <br>
>> HTTP Client REPLY:<br>
> <br>
> This is a child proxy response to the client. We need parent response to<br>
> the child proxy. Look for "HTTP Server RESPONSE" lines instead.<br>
> <br>
> <br>
> HTH,<br>
> <br>
> Alex.<br>
> <br>
> <br>
> <br>
>> ---------<br>
>> <br>
>> HTTP/1.1 502 Bad Gateway<br>
>> <br>
>> Server: squid/6.6<br>
>> <br>
>> Mime-Version: 1.0<br>
>> <br>
>> Date: Fri, 12 Jul 2024 14:57:08 GMT<br>
>> <br>
>> Content-Type: text/html;charset=utf-8<br>
>> <br>
>> Content-Length: 3629<br>
>> <br>
>> X-Squid-Error: ERR_READ_ERROR 0<br>
>> <br>
>> Vary: Accept-Language<br>
>> <br>
>> Content-Language: en<br>
>> <br>
>> Cache-Status: squid.host;detail=mismatch<br>
>> <br>
>> Via: 1.1 squid.host (squid/6.6)<br>
>> <br>
>> Connection: keep-alive<br>
>> <br>
>> ----------<br>
>> <br>
>> Regards,<br>
>> <br>
>> Ben.<br>
>> <br>
>> *From: *squid-users <squid-users-bounces@lists.squid-cache.org> on <br>
>> behalf of Amos Jeffries <squid3@treenet.co.nz><br>
>> *Date: *Friday, 12 July 2024 at 15:22<br>
>> *To: *squid-users@lists.squid-cache.org <squid-users@lists.squid-cache.org><br>
>> *Subject: *Re: [squid-users] TCP_MISS_ABORTED/502<br>
>> <br>
>> <br>
>> On 13/07/24 01:52, Alex Rousskov wrote:<br>
>>> On 2024-07-12 08:06, Ben Toms wrote:<br>
>>>> Seems that my issue is similar to - <br>
>>>> <a href="https://serverfault.com/questions/1104330/squid-cache-items-behind-basic-authentication">
https://serverfault.com/questions/1104330/squid-cache-items-behind-basic-authentication</a> <<a href="https://serverfault.com/questions/1104330/squid-cache-items-behind-basic-authentication">https://serverfault.com/questions/1104330/squid-cache-items-behind-basic-authentication</a>>
<https://serverfault.com/questions/1104330/squid-cache-items-behind-basic-authentication <<a href="https://serverfault.com/questions/1104330/squid-cache-items-behind-basic-authentication">https://serverfault.com/questions/1104330/squid-cache-items-behind-basic-authentication</a>>><br>
>>> <br>
>>> You are facing up to two problems:<br>
>>> <br>
>>> 1. Some authenticated responses are not cachable by Squid. Please share <br>
>>> HTTP headers of the response in question.<br>
>>> <br>
>> <br>
>> FYI, those can be obtained by configuring squid.conf with<br>
>> <br>
>> debug_options 11,2<br>
>> <br>
>> <br>
>> Cheers<br>
>> Amos<br>
>> <br>
>> <br>
>>> 2. TCP_MISS_ABORTED/502 errors may delete a being-cached response. These <br>
>>> can be bogus errors (essentially Squid logging bugs) or real ones (e.g., <br>
>>> due to communication bugs, misconfiguration, or compatibility problems). <br>
>>> I recommend adding %err_code/%err_detail to your logformat and sharing <br>
>>> the corresponding access.log lines (obfuscated as needed).<br>
>>> <br>
>>> Sharing (privately if needed) a pointer to compressed ALL,9 cache.log <br>
>>> while reproducing the issue using a single transaction may help us <br>
>>> resolve all the unknowns:<br>
>>> <br>
>>> <a href="https://wiki.squid-cache.org/SquidFaq/BugReporting#debugging-a-single-transaction">
https://wiki.squid-cache.org/SquidFaq/BugReporting#debugging-a-single-transaction</a> <<a href="https://wiki.squid-cache.org/SquidFaq/BugReporting#debugging-a-single-transaction">https://wiki.squid-cache.org/SquidFaq/BugReporting#debugging-a-single-transaction</a>>
<https://wiki.squid-cache.org/SquidFaq/BugReporting#debugging-a-single-transaction <<a href="https://wiki.squid-cache.org/SquidFaq/BugReporting#debugging-a-single-transaction">https://wiki.squid-cache.org/SquidFaq/BugReporting#debugging-a-single-transaction</a>>><br>
>>> <br>
>>> <br>
>>> HTH,<br>
>>> <br>
>>> Alex.<br>
>>> <br>
>>> <br>
>> <br>
>> <br>
>> _______________________________________________<br>
>> squid-users mailing list<br>
>> squid-users@lists.squid-cache.org<br>
>> <a href="https://lists.squid-cache.org/listinfo/squid-users">https://lists.squid-cache.org/listinfo/squid-users</a>
<br>
> <<a href="https://lists.squid-cache.org/listinfo/squid-users">https://lists.squid-cache.org/listinfo/squid-users</a>><br>
>> <https://lists.squid-cache.org/listinfo/squid-users <br>
> <<a href="https://lists.squid-cache.org/listinfo/squid-users">https://lists.squid-cache.org/listinfo/squid-users</a>>><br>
>> <br>
>> <br>
>> _______________________________________________<br>
>> squid-users mailing list<br>
>> squid-users@lists.squid-cache.org<br>
>> <a href="https://lists.squid-cache.org/listinfo/squid-users">https://lists.squid-cache.org/listinfo/squid-users</a>
<br>
> <<a href="https://lists.squid-cache.org/listinfo/squid-users">https://lists.squid-cache.org/listinfo/squid-users</a>><br>
> <br>
> _______________________________________________<br>
> squid-users mailing list<br>
> squid-users@lists.squid-cache.org<br>
> <a href="https://lists.squid-cache.org/listinfo/squid-users">https://lists.squid-cache.org/listinfo/squid-users</a>
<br>
> <<a href="https://lists.squid-cache.org/listinfo/squid-users">https://lists.squid-cache.org/listinfo/squid-users</a>><br>
> </span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>