<div dir="ltr"><div><div><div>Hello,<br><br></div>I am a little puzzled by something.</div><div>I am using squid 4.11 in a docker container.</div>So I am setting things up so that I have two docker containers, a squid container and an e2guardian container, where the e2guardian is an ICAP service. I am connecting these two containers to the same network and giving them names squid and e2guardian, respectively.<br><br></div>I added the following lines to my squid config:<br><b>icap_service service_req reqmod_precache bypass=0 icap://e2guardian:1344/request<br></b><div><b>icap_service service_resp respmod_precache bypass=0 icap://e2guardian:1344/response</b></div><div><br></div><div>But when I try to access I get an ICAP error, and the following log message:</div><div><b>essential ICAP service is down after an options fetch failure: icap://e2guardian:1344/request [down,!opt]</b><br><br></div><div>If I exec into the docker container and ping e2guardian, it resolves fine. If I take the IP address of the docker container and add it to that ICAP line in my squid.conf, it works just fine. But I don't want to have to do this obviously because I don't know what the IP of the docker container will be when it comes up.<br><br></div><div>I should also mention that if I manually add the docker IP to my /etc/hosts file on the squid container and give it the hostname of e2guardian, it <i>still</i> doesn't work. This inclines me to believe that, for some reason, no name resolution of any kind is performed when resolving the ICAP service.<br></div><div><br></div><div>My problem looks very similar to the following problem:<br><a href="https://squid-users.squid-cache.narkive.com/YZLtJNiW/dns-lookup-fails-initially-for-fqdn-in-squid">https://squid-users.squid-cache.narkive.com/YZLtJNiW/dns-lookup-fails-initially-for-fqdn-in-squid</a><br></div><div>Except that in my case it never comes up even after the three minutes, and it doesn't work either if I add e2guardian to my /etc/hosts file.</div><div><br></div><div>I should also mention that I am waiting at least three seconds after the e2guardian container comes up before I start the squid container.<br></div><div><br></div><div>Can someone help me diagnose this?</div><div><br></div><div>Thanks<br></div></div>