The most common problem of NIS clients is for a command to hang and generate console messages such as:
yp: server not responding for domain domainname. Still tryingSometimes many commands begin to hang, even though the system as a whole seems normal and you can run new commands.
The message above indicates that ypbind on the local machine is unable to communicate with ypserv in the domain domainname. This happens when a machine running ypserv has crashed and ypbind is unable to find another NIS server. It may also occur if the network or NIS server is so overloaded that ypserv cannot get a response back to the client's ypbind within the timeout period.
Under these circumstances, every client on the network will experience the same or similar problems. The condition is temporary in most cases. The messages will usually go away when the NIS server reboots and restarts ypserv or when the load on the NIS server or network itself decreases.
However, commands may hang and require direct action to clear them. The following list describes the causes of such problems and gives suggestions for fixing them:
On the client, enter domainname to see which domain name is set.
Compare that with the actual domain name in
/var/yp on the NIS master server.
If a machine's domain name is not the same as the server's,
the machine's domain name entry in its installation scripts
Log in as NIS administrator, edit the client's
installation scripts, and correct the domainname entry.
This ensures the domain name is correct every time the machine boots.
Then set domainname manually by entering:
The ypset command may also be used to allow binding to a specific server. However, if ypbind has not been started with either of the -ypset or -ypsetme options, this kind of binding is not possible. For security reasons, limit the use of -ypset to debugging purposes under controlled circumstances. Using -ypsetme can also result in serious security breaches. If you must start ypbind with the -ypset or -ypsetme option, once you have fixed the problem kill ypbind and restart it again without the option.
Look for ypserv and ypbind processes.
If the server's ypbind daemon is not running,
start it by entering:
If a ypserv process is running, enter:
on the NIS server.
If ypwhich does not respond,
ypserv has probably hung.
Restart it by entering the following while logged
in as NIS administrator:
ps -eaf | grep ypserv
where pid is the process ID for ypserv. If ps shows no ypserv process running, start one up.
Notice that if you run ypbind and you enter ypwhich immediately, ypwhich will return the error message ``not found'' in all cases. Run ypwhich again; it should now return the name of a server.
where pid is the process-ID for ypbind.