<div dir="ltr"><pre style="white-space:pre-wrap;color:rgb(0,0,0)">> So, does the problem exist if you:
> 1. Stop Squid
> 2. Type "host <a href="http://short.domain.name">short.domain.name</a>" 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)
</pre><div>yes the problem still exists</div><div><br></div><div><pre style="white-space:pre-wrap;color:rgb(0,0,0)">>><i> I see in cache.log that its adding nameservers from /etc/resolv.conf
</i>>><i>
</i>>><i> 2016/05/27 10:32:52 kid1| Adding nameserver 10.32.1.1 from /etc/resolv.conf
</i>>><i> 2016/05/27 10:32:52 kid1| Adding nameserver 10.32.1.1 from /etc/resolv.conf
</i>>><i> 2016/05/27 10:32:52 kid1| Adding nameserver 8.8.8.8 from /etc/resolv.conf
</i>
> Why have you added 10.32.1.1 twice?</pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)">That was by chance. Its 10.32.1.2.</pre><pre style=""><pre style="color:rgb(0,0,0);white-space:pre-wrap">><i> > Is that DNS server running and answering queries before the Squid
</i>><i> > server/service starts up?
</i>><i>
</i>><i> I do curl/ping/nslookup for icap server from squid machine, it is able to
</i>><i> resolve that particular ip.
</i>
> You do this before starting Squid, and it works, and then when you start
Squid, it fails for 3 minutes??</pre><pre style="color:rgb(0,0,0);white-space:pre-wrap">Yes, after 3 minutes it's able to resolve DNS and brings up the service.</pre><pre style="color:rgb(0,0,0);white-space:pre-wrap">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.</pre><pre style="color:rgb(0,0,0);white-space:pre-wrap"><p class=""><span class="">###Request</span></p><p class=""><span class="">OPTIONS icap://<span style="font-family:arial,sans-serif"><a href="http://short.domain.name">short.domain.name</a></span>:1344 ICAP/1.0</span></p><p class=""><span class="">Host: <span style="font-family:arial,sans-serif"><a href="http://short.domain.name">short.domain.name</a></span>:1344</span></p><p class=""><span class="">Allow: 206</span></p><p class=""><span class="">###Response</span></p><p class=""><span class="">
<span style="font-family:arial,sans-serif">ICAP/1.0 200 OK</span>
</span></p><p class=""><span style="font-family:arial,sans-serif">Methods: REQMOD, RESPMOD</span><br></p><p class=""><span style="font-family:arial,sans-serif">Options-TTL: 3600</span><br></p><p class=""><span style="font-family:arial,sans-serif">Encapsulated: null-body=0</span><br></p><p class=""><span style="font-family:arial,sans-serif">Max-Connections: 400</span><br></p><p class=""><span style="font-family:arial,sans-serif">Preview: 30</span><br></p><p class=""><span style="font-family:arial,sans-serif">Service: Gateway 7.5.2 </span><br></p><p class=""><span style="font-family:arial,sans-serif">ISTag: "00005042-2.94.230-00008178"</span><br></p><p class=""><span style="font-family:arial,sans-serif">Allow: 204</span><br></p><p class=""><span class=""> --------
<span style="font-family:arial,sans-serif"><br></span></span></p><p class=""><span class="">Additionally, i increased debug level and saw this in cache logs
</span></p></pre><pre style=""><p class="" style="color:rgb(0,0,0);white-space:pre-wrap"><span class=""> Address.cc(389) lookupHostIP: Given Non-IP '</span><span style="font-family:arial,sans-serif"><a href="http://short.domain.name">short.domain.name</a></span><span style="font-family:arial,sans-serif">': Name or service not known</span></p><p class="" style=""><font color="#000000" face="arial, sans-serif"><span style="white-space:pre-wrap">Thanks</span></font></p><font color="#000000"><span style="white-space:pre-wrap">
</span></font></pre></pre></div></div>