Subject: Home made resolver - why ?

From: David TAILLANDIER <[email-masked]>
Date: Sun, 29 Nov 2009 17:24:53 +0100

Okay, first test, first problem  :-)

/var/argus/log contains tons of:
--> RESOLV recv failed: refused connection

I look inside the code and discover that the resolver code is home-made, 
instead to be the regular library call. There is a good reason, for 
sure. But in my case, this piece of code just don't work.

cat /etc/resolv.conf
--> nameserver xx.xx.xx.xx
--> nameserver yy.yy.yy.yy
The first server is down today. Argus's code break. Regular library call 
don't.

The real problem with that is: don't using standard feature often lead 
to problems.
We can't use the nice-and-new functionnality added to libc resolver. For 
example /etc/gai.conf in my Debian servers. Or any system hack, 
modification, etc. Someone else already wrote a good resolver and Perl 
have access to it.

I'm not comfortable enought with Perl (as seen in http://fanal.fr) to 
hack the code. Maybe someone have a diff for let Resolv.pm use the 
standard library call ?

---

From: Jeff Weisberg <[email-masked]>
Date: Mon, 30 Nov 2009 09:23:30 -0500

> --> RESOLV recv failed: refused connection

this is normal, it is not an error.
it means the nameserver was down.
argus will then try the next one.

> I look inside the code and discover that the resolver code is home- 
> made, instead to be the regular library call. There is a good  
> reason, for sure. But in my case, this piece of code just don't work.
>
> cat /etc/resolv.conf
> The first server is down today. Argus's code break. Regular library  
> call don't.

I don't understand.
what broke?
did something not work?
what did not work?

> The real problem with that is: don't using standard feature often  
> lead to problems.
> Someone else already wrote a good resolver and Perl have access to it.

yes, "someone" wrote a good resolver, and "someone" included in the  
argus distribution.

> I'm not comfortable enought with Perl (as seen in http://fanal.fr)  
> to hack the code. Maybe someone have a diff for let Resolv.pm use  
> the standard library call ?

the "hack" is to remove the "Resolv" line that you put in your config  
file.

argus only uses its own resolver if you tell it to.

if you remove the "Resolv" line from your config file,
argus will use the library code that you seem to like better.

---

From: David TAILLANDIER <[email-masked]>
Date: Mon, 30 Nov 2009 16:17:03 +0100

> argus will then try the next one.

I don't know if Argus try the next one. But Argus don't resolve anything 
if the first server refuse to server any dns query.

> yes, "someone" wrote a good resolver, and "someone" included in the 

Okay :-)
You can think this is a good resolver. But the facts are against that: 
it broke on the first not-ideal case I saw.

> the "hack" is to remove the "Resolv" line that you put in your config file.

We then lose the ability to handle "moving" addresses. If I understand 
the documentation: the dns names are resolved when the daemon start, and 
never after that.

If I move my.server.com to another location, I have to restart Argus 
daemon. Worst, if I have my.site.com on a dynamic ip, Argus have no way 
to re-resolv it. Even worst, if I want to ping computers configured with 
DHCP and dynamic dns I'm stuck too. Or I have to restart Argus with cron 
every 5 minutes, which is not an option for most admin.

---

From: Andrew D Kirch <[email-masked]>
Date: Mon, 30 Nov 2009 11:53:29 -0500

> it broke on the first not-ideal case I saw.
You know, biting the hand that feeds you comes to mind here, you've got
a solution, and I have not, in 7 years of using Argus had an issue with
Resolv.  Perhaps you should look between the keyboard and the chair to
find the problem?  In other words, chill please.

Andrew