1833588 Members
4258 Online
110061 Solutions
New Discussion

resolver issue

 
HPP
Regular Advisor

resolver issue

Hi,
We have 4 HP-UX 11.00 servers. Each one of them runs apache web server and we have switch does a health check every 5 seconds on these servers. For each health check, web server tries to query internal DNS for A record and PTR. To avoid DNS query i have made entry for switch (for example switch.mydoamin.com and 192.168.32.3) in /etc/hosts of the each web server and
/etc/resolv.conf looks like this on web server:

domain mydomain.com
nameserver 192.192.1.10

and /etc/nsswitch.conf looks like this:
hosts: files [NOTFOUND=continue] dns

Why does the resolver tires to query DNS server, inspite of having an entry in /etc/hosts and nsswitch.conf says to query files and then query DNS?

I even tried putting some IP address in /etc/resolv.conf which is not actually an IP address of a DNS server and then tried to do

#nslookup switch.mydoamin.com

thats it nslookup hangs in there and tries look for DNS. The entry is already there in /etc/hosts for switch.domain.com and resolver is not looking into files first.

On DNS server the log file is getting filled like crazy.

Thanks in advance for any input.


Be Teachable
11 REPLIES 11
John Dvorchak
Honored Contributor

Re: resolver issue

Is /etc/hosts permissions at least 444 r--r--r--?
If it has wheels or a skirt, you can't afford it.
Martin Johnson
Honored Contributor

Re: resolver issue

Have you tried:

ps -ef | grep inetd
kill -HUP inetd_pid


HTH
Marty
Rainer von Bongartz
Honored Contributor

Re: resolver issue

Try putting this in nsswitch.conf

hosts: files[NOTFOUND=continue UNAVAIL=continue] dns [NOTFOUND=return UNAVAIL=continue TRYAGAIN=continue]

Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
HPP
Regular Advisor

Re: resolver issue

Hi,
the permission on /etc/hosts /etc/nsswitch.conf and /etc/resolv.conf was -r--r--r--

I did kill -HUP inetd_pid, but no luck.

Thanks
Be Teachable
John Dvorchak
Honored Contributor

Re: resolver issue

Although not likley, it is possible that you /etc/hosts file is corrupt or has a bad entry. Can you mv the hosts file and create a new one with just:
127.0.0.1 localhost
192.xxx.xxx.xxx your.real.address
192.168.32.3 switch.mydomain.com switch

Then nslookup switch and then switch.mydomain.com

If it has wheels or a skirt, you can't afford it.
HPP
Regular Advisor

Re: resolver issue

Rainer,
I tried entry
hosts: files[NOTFOUND=continue UNAVAIL=continue] dns [NOTFOUND=return UNAVAIL=continue TRYAGAIN=continue]

in /etc/nsswitch.conf and no luck.

Thanks
Be Teachable
Uday_S_Ankolekar
Honored Contributor

Re: resolver issue

rename resolv.conf and see what happens.
Good Luck..
HPP
Regular Advisor

Re: resolver issue

John Dvorchak,
Recreated the /etc/hosts file. Same problem with querying.

Thanks
Be Teachable
Rainer von Bongartz
Honored Contributor

Re: resolver issue


Does it work if you only have the entry

hosts: file

in nwswitch.conf ???


Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Sergejs Svitnevs
Honored Contributor

Re: resolver issue

Try to debug syntactic errors in the switch configuration file using "nslookup -swdebug" command.

Regards,
Sergejs
Wilfred Chau_1
Respected Contributor

Re: resolver issue

do you have switch.domain.com or
switch.mydomain.com?

what is the output of nslookup switch.mydomain.com?

Something like the below?
> nslookup switch.mydomain.com
Using /etc/hosts on:

looking up FILES
*** No address information is available for "switch.mydomain.com"