[Asterisk-Users] DNS Server Failure wreaks havoc

Rich Adamson radamson at routers.com
Sun Nov 6 19:24:09 MST 2005


> I don't think this is a new issue--I've seen it talked about on the list 
> before.  I don't know if I've ever seen anyone post a fix.
> 
> My DNS server went out last night in a horrendous storm when an upstream 
> link went down.  The madness is that the behavior of the whole server, 
> including the part that's handling my POTS lines, gets wigged out on a 
> DNS failure, making the whole system unusable.  I have two questions; 
> being able to solve either would be wonderful:
> 
> * Is it true that if I hand-resolve the server names in all the config 
> files, and then use those instead of the hostnames, this problem won't 
> occur?  That's not exactly optimal, of course, since it defeats the 
> whole purpose of dynamic name binding.  But it's hard to explain to my 
> SOHO customers, who don't really need any IP-based functionality 
> (although I give all of them some complimentary minutes on nufone) why 
> their phones go down when the Internet is down.

Asterisk's use of dns is less then optimal. It expects a response,
and if that response contains multiple entries, all entries past the
first are ignored. If no response, you already know what happens.
Use numeric addresses, etc/hosts, or a dns cache on asterisk. 
 
> * Is it true that there's no way to get applications in Linux, generally 
> speaking, to try more than a single server when doing a name resolve? 
> Only the first server listed in /etc/resolv.conf (on my systems, anyway) 
> seems to ever get consulted.

That's true in most systems. If there are multiple entries, the first
one will be attempted, and if no response, the second (etc) will be
attempted.  If the first responds with _anything_ (even an unknown host),
that is considered a response and the dns client will not attempt the
second entry in resolv.conf.

> I think both of these situations are pretty serious failings, if in fact 
> they're failings in the systems and not this bedeviled cranium.






More information about the asterisk-users mailing list