Random failure while browsing through squid after proxy failed over to the next server in the cache_peer

Solution Verified - Updated -

Issue

  • Every squid server has been configured to failover via cache_peer parameter to the next available squid server if  it's not able to serve client requests due to ISP failures or other network issues. If the ISP is down (simulated it by bringing down the external interface of squid server), then squid failover works fine without any problems, but clients get page cannot be loaded messages randomly while browsing. The error message is as below.

    The requested URL could not be retrieved
    While trying to retrieve the URL: http://www.example.com/xxx
    
    The following error was encountered:
    
    
       Unable to determine IP address from host name for www.example.com
    
    
    The dnsserver returned:
    
    
       Server Failure: The name server was unable to process this query.
    
    
    This means that:
    
    
    The cache was not able to resolve the hostname presented in the URL.  
    Check if the address is correct.  
    Your cache administrator is root.
    Generated Mon, 28 Sep 2009 10:18:38 GMT by hostname
    
  • Every squid proxy server itself is a DNS server. This DNS server has some zone specific to the intranet configured in it.

  • Squid proxy attempts to resolve the site names to ip addresses from localhost so that it can check whether any ip based acls are matched or not.

  • If it can't match the zones configured in it, it (DNS Server) contacts the root name server and resolves the name through iterative queries. It has forwarders disabled so the only option is to use root name server and resolve the name.
  • If 127.0.0.1 is down or it cannot contact root DNS servers, then it contacts the secondary nameserver in the LAN (as per the configuration in resolv.con) and resolves the name.
  • Resolv.conf of every squid server has been configured as below.

    nameserver 127.0.0.1nameserver <ip>
    

Environment

  • Red Hat Enterprise Linux 5
  • squid-2.6.STABLE21-3.el5-i386

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content