[squid-users] IPv4 addresses go missing - markAsBad wrong?

Stephen Borrill squid at borrill.org.uk
Mon Jan 8 13:31:24 UTC 2024


I'm trying to determine why squid 6.x (seen with 6.5) connected via 
IPv4-only periodically fails to connect to the destination and then 
requires a restart to fix it (reload is not sufficient).

The problem appears to be that a host that has one address each of IPv4 
and IPv6 occasionally has its IPv4 address go missing as a destination. 
On closer inspection, this appears to happen when the IPv6 address (not 
the IPv4) address is marked as bad. A log fragment is as follows:

2024/01/08 13:18:39.974 kid1| 44,2| peer_select.cc(460) resolveSelected: 
Find IP destination for: clientservices.googleapis.com:443' via 
clientservices.googleapis.com
2024/01/08 13:18:39.974 kid1| 44,2| peer_select.cc(1174) handlePath: 
PeerSelector82284 found conn696198 local=0.0.0.0 
remote=142.250.187.227:443 HIER_DIRECT flags=1, destination #1 for 
clientservices.googleapis.com:443
2024/01/08 13:18:39.974 kid1| 44,2| peer_select.cc(1174) handlePath: 
PeerSelector82284 found conn696199 local=[::] 
remote=[2a00:1450:4009:820::2003]:443 HIER_DIRECT flags=1, destination 
#2 for clientservices.googleapis.com:443
2024/01/08 13:18:39.974 kid1| 44,2| peer_select.cc(479) resolveSelected: 
PeerSelector82284 found all 2 destinations for 
clientservices.googleapis.com:443
2024/01/08 13:18:40.245 kid1| 14,2| ipcache.cc(1031) markAsBad: 
[2a00:1450:4009:820::2003]:443 of clientservices.googleapis.com
2024/01/08 13:18:40.245 kid1| 14,3| ipcache.cc(946) seekNewGood: 
succeeded for clientservices.googleapis.com: [2a00:1450:4009:820::2003] 
#2/2-1
2024/01/08 13:18:40.245 kid1| 14,3| ipcache.cc(978) restoreGoodness: 
cleared all IPs for clientservices.googleapis.com; now back to 
[2a00:1450:4009:820::2003] #2/2-1
2024/01/08 13:18:42.065 kid1| 14,3| Address.cc(389) lookupHostIP: Given 
Non-IP 'clientservices.googleapis.com': hostname or servname not 
provided or not known
2024/01/08 13:18:42.065 kid1| 44,2| peer_select.cc(460) resolveSelected: 
Find IP destination for: clientservices.googleapis.com:443' via 
clientservices.googleapis.com
2024/01/08 13:18:42.065 kid1| 14,3| Address.cc(389) lookupHostIP: Given 
Non-IP 'clientservices.googleapis.com': hostname or servname not 
provided or not known
2024/01/08 13:18:42.065 kid1| 44,2| peer_select.cc(1174) handlePath: 
PeerSelector82372 found conn697148 local=[::] 
remote=[2a00:1450:4009:820::2003]:443 HIER_DIRECT flags=1, destination 
#1 for clientservices.googleapis.com:443
2024/01/08 13:18:42.065 kid1| 44,2| peer_select.cc(479) resolveSelected: 
PeerSelector82372 found all 1 destinations for 
clientservices.googleapis.com:443


This shows two subsequent connection attempts to 
clientservices.googleapis.com. The first one has both IPv4 and IPv6 
destinations. The IPv6 address is passed to markAsBad. After that the 
IPv4 address is not listed as a destination.

Note that there have been many connections to 
clientservices.googleapis.com prior to this where markAsBad was not 
called, even though IPv6 connectivity was never available.

-- 
Stephen


More information about the squid-users mailing list