LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 01-19-2009, 09:19 AM   #1
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 655

Rep: Reputation: 40
DNS lookup failed: How does /etc/resolv.conf work?


Hello forum.


One of you applications (running on linux) failed due to a DNS server not being available (it was apparently getting restarted). The linux box is set up with two DNS servers in /etc/resolv.conf:
Code:
nameserver 1.1.1.1
nameserver 1.1.1.2
It was the first server which was down for a short while. The second server was, according to logs on the DNS server itself, up while the first one was down.

So my question is this: Why did the application fail even though the second DNS server was up? My understanding of /etc/resolv.conf is that the first server is queried, and after 5 second of non-responsiveness the second server is queried. If this servers doesn't respond, the whole thing goes back to start for 2 more rounds. These values are, if I remember correctly, the default values.

So what may be the reason why the application didn't query that second server? Any ideas anyone?


- kenneho
 
Old 01-19-2009, 09:24 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,511

Rep: Reputation: 884Reputation: 884Reputation: 884Reputation: 884Reputation: 884Reputation: 884Reputation: 884
Perhaps the time-out of the application was shorter then the 5 seconds?
 
Old 01-20-2009, 06:54 AM   #3
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 655

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by repo View Post
Perhaps the time-out of the application was shorter then the 5 seconds?
Well, that's a posibility. I'm not sure if the application uses internal linux tools to perform the lookup, or if it uses it's own tools. In case of the formed, I'd suspect that if "host" or "dig" returns an answer everything is good. In case of the latter, it depends on the application specific timeout.

I'll try to find out which of the alternatives the application is using, and post back here.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
host: parse of /etc/resolv.conf failed D.A. Linux - Software 4 08-09-2007 12:30 PM
DNS Hosts.conf or resolv.conf problem mac_casey Suse/Novell 0 03-26-2006 09:21 AM
resolv.conf dns issues billbob Linux - Software 3 09-30-2005 12:20 PM
dns server and /etc/resolv.conf freeosfreesoul Linux - Laptop and Netbook 2 09-02-2005 06:45 PM
DNS & resolv.conf robeb Linux - Networking 1 06-25-2002 09:15 PM


All times are GMT -5. The time now is 08:41 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration