Re: Occasional spurious ERR_DNS FAIL?

From: Jonathan Larmour <[email protected]>
Date: Fri, 20 Jun 1997 19:51:47 +0100

At 11:30 19/06/97 -0700, Duane Wessels wrote:
>JLarmour@origin-at.co.uk writes:
>
>>Occasionally (on order of once a day for my relatively lightly used squid)
>>I notice DNS failures in cache.log for sites that exist. The access.log
[snip]
>You could add these couple of lines, then an ERR_DNS_FAIL occurs,
>the dnsserver error message will be logged to cache.log.
[patch snipped]

Just some more info - I haven't sussed this yet...

I'd already added some debugging to dnsserver.c so I could invoke dnsserver
with -d, and when there was a DNS failure, it output an entry like:
www.badhost.com 0 1

in the file dnsserver.<pid>.log where the second digit is h_errno (from
netdb.h). The exact change is below for interest's sake.

However, after a while, I looked in cache.log, and found _3_ more examples
of ERR_DNSFAIL on valid hosts: www.documentum.com, www.netlink.co.uk, and
www.ssionline.com. Interestingly these did _not_ show up in any of the
dnsserver.<pid>.log files, which seems to imply that the lookup succeeded
(as indeed it should!), and it is some other part of squid that is thinking
it failed.

I'll add Duane's test patch now in addition, and see what happens. But I
think I've now established its a squid fault... somewhere. Unfortunately,
this all takes time as the bug is not explicitly reproducible, so I'll get
back to you on Monday, unless someone's keener than me :-).

Jonathan L.

*** dnsserver.c.old Thu Jun 19 19:13:56 1997
--- dnsserver.c Thu Jun 19 19:14:37 1997
***************
*** 369,375 ****
        }
        if (!result || (strlen(result->h_name) == 0)) {
            if (logfile) {
! fprintf(logfile, "%s %d\n", req-uest, (int) (stop - start));
                fflush(logfile);
            }
            printf("$fail %s\n", request);
--- 369,375 ----
        }
        if (!result || (strlen(result->h_name) == 0)) {
            if (logfile) {
! fprintf(logfile, "%s %d %d\n", request, (int) (stop -
start), h_errno);
                fflush(logfile);
            }
            printf("$fail %s\n", request);

Origin UK,323 Cambridge Science Park,Cambridge,England. Tel: +44(1223)423355
------[ Do not think that every sad-eyed woman has loved and lost... ]------
April 12th! Ra!Ra!----[ she may have got him. -Anon ]-----April 12th! Ra!Ra!
Help fight spam! http://spam.abuse.net/ These opinions are all my own fault
Received on Fri Jun 20 1997 - 12:00:08 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:35:33 MST