icap server name lookup

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

icap server name lookup

agent_js03
Hello,

I am a little puzzled by something.
I am using squid 4.11 in a docker container.
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.

I added the following lines to my squid config:
icap_service service_req reqmod_precache bypass=0 icap://e2guardian:1344/request
icap_service service_resp respmod_precache bypass=0 icap://e2guardian:1344/response

But when I try to access I get an ICAP error, and the following log message:
essential ICAP service is down after an options fetch failure: icap://e2guardian:1344/request [down,!opt]

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.

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 still 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.

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.

I should also mention that I am waiting at least three seconds after the e2guardian container comes up before I start the squid container.

Can someone help me diagnose this?

Thanks

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: icap server name lookup

Amos Jeffries
Administrator
I suspect this is the lookup issue you already found, but with added complication of the dotless name preventing even the delayed lookup working.

You can confirm that by adding the .local TLD or whichever your network uses internally to the names (with hosts file entry). It should then behave same as the delayed lookup issue.

Amos

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users