[squid-users] idnsSendQuery: Can't send query, no DNS socket!
Alex Rousskov
rousskov at measurement-factory.com
Tue Apr 11 00:21:55 UTC 2023
On 4/10/23 17:14, andre.bolinhas at articatech.com wrote:
> We have experienced some issue on our squid servers, time to times the
> listen port fails and users are unable to connected to the proxy.
> We already try use squid 4.17 and squid 5.8 but had the same issue on both
> version, you can find I GDrive the extract of the cache.log on the time of
> the failure.
> 2023/04/10 16:25:54 kid2| Starting Squid Cache version 4.17 for x86_64-pc-linux-gnu...
> 2023/04/10 16:26:00 kid2| Shutting down...
> 2023/04/10 16:26:00 kid2| Squid Cache (Version 4.17): Exiting normally.
> 2023/04/10 16:26:03 kid2| Starting Squid Cache version 4.17 for x86_64-pc-linux-gnu...
> 2023/04/10 16:26:15 kid2| Shutting down...
> 2023/04/10 16:26:15 kid2| Squid Cache (Version 4.17): Exiting normally.
> 2023/04/10 16:26:18 kid2| Starting Squid Cache version 4.17 for x86_64-pc-linux-gnu...
Are you starting and shutting down your Squids at a very high frequency?
FWIW, older Squids, possibly including Squid v4, are not very good at
handling this kind of exercise.
> 2023/04/10 16:23:19 kid2| Preparing for shutdown after 221344 requests
> 2023/04/10 16:23:19 kid2| Preparing for shutdown after 221344 requests
> 2023/04/10 16:23:19 kid2| Preparing for shutdown after 221344 requests
> 2023/04/10 16:23:19 kid2| Preparing for shutdown after 221344 requests
> 2023/04/10 16:23:19 kid2| Preparing for shutdown after 221344 requests
This Squid appears to be seriously confused, stuck in some kind of a
shutdown loop. Do you see similar repeated same-kid same-request-count
"Preparing for shutdown" messages with Squid v5+?
> On the cache log I see to many
> idnsSendQuery: Can't send query, no DNS socket!
IIRC, at a certain shutdown stage, Squid closes DNS sockets. That
prevents Squid from sending DNS queries. I do not know if that shutdown
aspect has improved since v4. However, I would be a lot more worried
about frequent restarts and shutdown loops(?) at this point. Something
unusual and probably bad is going on...
HTH,
Alex.
> And
> 2023/04/10 16:25:59 kid4| Waiting 10 seconds for active connections to
> finish
> 2023/04/10 16:25:59 kid4| Preparing for shutdown after 763 requests
>
> This is the dns configuration squid/dns.conf
> # Return DNS used by the system (means resolv.conf)
> client_dst_passthru off
> host_verify_strict off
> ignore_unknown_nameservers off
> dns_retransmit_interval 3 seconds
> dns_v4_first on
> ipcache_size 16384
> ipcache_low 90
> ipcache_high 95
> fqdncache_size 1024
> positive_dns_ttl 6 hours
> negative_dns_ttl 300 seconds
>
> Resolv.conf
> domain xyz.my
> search xyz.my
> options attempts:2 timeout:2
> nameserver 127.0.0.1
> nameserver 8.8.8.8
> nameserver 1.1.1.1
>
> 127.0.0.1 is the unbound internal DNS.
>
>
> _______________________________________________
> squid-users mailing list
> squid-users at lists.squid-cache.org
> http://lists.squid-cache.org/listinfo/squid-users
More information about the squid-users
mailing list