Operating System - Linux
1747988 Members
4884 Online
108756 Solutions
New Discussion юеВ

Re: configuring nsswitch.conf - strange system behaviour

 
Igor_31
Advisor

configuring nsswitch.conf - strange system behaviour

Hello,
we have rx2660 server, HP-UX 11.23.
This server has no dns server configured. It's dns resolver only.
For some time now the server stopped resolving internet names. The resolv.conf is correct.

Also we observe very slow server response on any activities (users logons,ftp sessions, sam utility and so on). At that(!) all users are in the local network with server.

When we remove dns from hosts record in nsswitch.conf, all begin to work normally.
If we put dns back in this file all activities
become slow.

The problem record in nsswitch.conf is:
hosts: files dns nis #doesn't work

hosts: files nis #it works

We don't understand why this record have so strong influence on server activity. We cannot troubleshoot further the dns problem because the influence.

Please advice how to find out the cause.


9 REPLIES 9
sujit kumar singh
Honored Contributor

Re: configuring nsswitch.conf - strange system behaviour

hi

just to tell the difference in the two syntaxes as that suggests in /etc/nsswitch.conf is that

hosts: files dns nis #doesn't work

means for resoultion of the names conatct files /etc/hosts on the system, then try any DNS server as u might have put in the /etc/resolv.conf and then Search for anyy NIS server that u might have put in the resolv.conf

the meaning of

hosts: files nis #it works


is that for name resolutions serach the local files /etc/hosts and then serach the NIS servers as u mighthave put in the /etc/resolv.conf.


the first sequence mot working might be due to the fact that this server is trying to see the Servers in the /etc/resolv.conf as DNS Servers or using named daemin and that is not happening or is trying for long and not giving up.

the other NIS works on the basis of ypbind daemon and that might be easily contacting one of the servers as listed in the /etc/resolv.conf as the NIS Servers.


That is the basic idea.

Regards
Sujit

Avinash20
Honored Contributor

Re: configuring nsswitch.conf - strange system behaviour

I thing which you need to do is to check the DNS server
The DNS server should be fast enough to provide the IP address/hostname resolution

Check with the nslookup from Windows/Unix host with dns/without dns in /etc/nsswitch.conf
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
rick jones
Honored Contributor

Re: configuring nsswitch.conf - strange system behaviour

You might make certain that your system still has IP connectivity to the DNS server(s) in /etc/resolv.conf - eg can ping them.
there is no rest for the wicked yet the virtuous have no pillows
Bill Hassell
Honored Contributor

Re: configuring nsswitch.conf - strange system behaviour

If you specify dns in the nsswitch.conf file then the DNS server(s) must work or you will experience very long delays as the system tries to resolve a name into an IP address. Apparently the DNS server you are using is not working, not reachable from your network, or is denying you access. Until you fix the DNS server, just change nsswitch.conf to:

hosts: files

The "nis" entry is trying to contact a Network Information name Service. If you do not have such a server configured, you should not use nis as an option.


Bill Hassell, sysadmin
Igor_31
Advisor

Re: configuring nsswitch.conf - strange system behaviour

I confused a few colleagues.

Some of you claim that the record
in nsswwitch.conf:
hosts: files dns nis #does not work

but in /etc directory i can see nsswitch.hp_defaults which contains the record:
hosts: dns [NOTFOUND=return] nis [NOTFOUND=return] files

Besides as I understand this file points the search order for resolving of name for the server.


Avinash20
Honored Contributor

Re: configuring nsswitch.conf - strange system behaviour

nsswitch.conf
hosts: files dns nis

## This has to work

## What we are trying to tell is that there is some issue while communicating from HP-UX to the DNS server which you have mentioned in /etc/resolv.conf

Try the following from HP-UX hosts when the DNS entry is there in nsswitch.conf

# ping
# timex nslookup
# timex nslookup

Check how much time is takes

Also check for reverse lookup

# timex nslookup
# timex nslookup
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Avinash20
Honored Contributor

Re: configuring nsswitch.conf - strange system behaviour

Also try assigning points to your posts which will help everyone to respond more.

http://forums11.itrc.hp.com/service/forums/helptips.do?#33
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
rick jones
Honored Contributor

Re: configuring nsswitch.conf - strange system behaviour

As far as name resolution order goes, no mater what "nsswitch" files you find in /etc, the only one that "matters" is nsswitch.conf - the others are there as a matter of convenience.

Also, any process will read /etc/nswitch.conf _once_ and IIRC only once. So, if you have a process which is started and performs name resolution before you alter /etc/nsswitch.conf it will continue to use the old information for the duration of the process's existence.
there is no rest for the wicked yet the virtuous have no pillows
Igor_31
Advisor

Re: configuring nsswitch.conf - strange system behaviour

Yes, I have found out the cause of the problem.
The first cause was in the connectivity(firewall rules).
The second cause was in in the dns parameteres for this server ond DNS-sever.

Thanks to all.