1825008 Members
2733 Online
109678 Solutions
New Discussion юеВ

DNS timeout

 
Ruben Cardenal
Frequent Advisor

DNS timeout

Hi!

This is a question I posted on System Administration forum, without an affordable result, can you help?

Well, this is a qmail & dns related question. I have qmail installed in one of my HP9000 servers. That server collects logs, etc, from other machines via e-mail. Later, through POP3, I read messages in the accont where they arrive. But there's a little problem (in fact, a timeout). As these machines are isolated from the internet, they do not use DNS. When I do this:

root@grecopr2:/# telnet localhost 110
Trying...
Connected to localhost.
Escape character is '^]'.
+OK <18155.1012994166@grecopr2>

Before the last line, there's a delay of 30 seconds, which is the time the dns gives a timeout because it can't resolve the machine name. After that, messages can be, of course, readed properly. As qmail is a daemon that does *NOT* read /etc/hosts, it's not a solution for me to put machine address machine IP in that file. I need another way for dns to resolve at least my local machine IP for POP3 logins to be done quickly. I hope I have explained myself well :)

TIA
5 REPLIES 5
K.Vijayaragavan.
Respected Contributor

Re: DNS timeout

Hi,

One suggestion,

Have you searched in another forum also , if not you can search in
http://searchhp.techtarget.com/tip/1,289483,sid6_gci776891,00.html

-vijay
"Let us fine tune our knowledge together"
Christopher Caldwell
Honored Contributor

Re: DNS timeout

I'm not sure qmail really cares where it's supposed to look names up (i.e. if qmail uses the normal resolver routines like gethostbyname, gethostbyaddr, use of the hosts file vs dns is controlled by the nsswitch.conf file and should be invisable to the application calling the resolver routine).

Add a localhost entry to /etc/hosts:
127.0.0.1 localhost

set up nsswitch.conf. If localhost doesn't look up correctly, watch out for the domain directive in /etc/resolv.conf.

In addition, you can build localhost into the zone for your domain if resolv.conf is "helping you" qualify names.
Wodisch
Honored Contributor

Re: DNS timeout

Hello,

turn your HP into a DNS name server. Use the tool "hosts2named" and you will be up and running within minutes.
Then configure your "/etc/resolv.conf" and "/etc/nsswitch.conf" and you are done with the client-side, too.

HTH,
Wodisch
Wilfred Chau_1
Respected Contributor

Re: DNS timeout

Check and make sure you have localhost in your /etc/hosts file and also make sure in nsswitch.conf, you have files listed first for hosts. If you have instead dns listed first in the nsswitch.conf file, telnet will try to append a domain name to localhost and try to resolve it in DNS which will not have that information.
Sanjay_6
Honored Contributor

Re: DNS timeout

Hi Ruben

This is how my /etc/resolv.conm is configured,

search out.domain.name.com
nameserver name_server1_ip
nameserver name_server2_ip
nameserver name_server3_ip


now if server 1 and 2 are down. if i do a nslookup, it automatically defaults to server 3. Then if i do a telnet to one of the server whose address is resolved using DNS, it takes a while longer since it probably tries the server 1 and 2 first before it finally tries server 3. Do make sure you have the latest patch installed on your system.

Hope this helps.

Regds