[squid-users] DNS lookup fails initially for FQDN in squid
amadaan at ncsu.edu
Fri May 27 15:51:36 UTC 2016
> So, does the problem exist if you:
> 1. Stop Squid
> 2. Type "host short.domain.name" to resolve the ICAP server manually
> 3. Start Squid
> (The last two commands in as quick succession as possible - preferably on a
> single line separated by a semi-colon)
yes the problem still exists
>>* I see in cache.log that its adding nameservers from /etc/resolv.conf
*>> >>* 2016/05/27 10:32:52 kid1| Adding nameserver 10.32.1.1 from
*>>* 2016/05/27 10:32:52 kid1| Adding nameserver 10.32.1.1 from /etc/resolv.conf
*>>* 2016/05/27 10:32:52 kid1| Adding nameserver 220.127.116.11 from /etc/resolv.conf
> Why have you added 10.32.1.1 twice?
That was by chance. Its 10.32.1.2.
>* > Is that DNS server running and answering queries before the Squid
*>* > server/service starts up?
*> >* I do curl/ping/nslookup for icap server from squid machine, it is able to
*>* resolve that particular ip.
> You do this before starting Squid, and it works, and then when you start
Squid, it fails for 3 minutes??
Yes, after 3 minutes it's able to resolve DNS and brings up the service.
on additional debugging by switching on tcpflow, I see squid sends
OPTIONS request to icap server and that is when it is able to resolve
DNS and which brings the service up in 3 minutes.
OPTIONS icap://short.domain.name:1344 ICAP/1.0
ICAP/1.0 200 OK
Methods: REQMOD, RESPMOD
Service: Gateway 7.5.2
Additionally, i increased debug level and saw this in cache logs
Address.cc(389) lookupHostIP: Given Non-IP 'short.domain.name': Name
or service not known
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the squid-users