When Commands Hang

The most common problem occurring at an NIS client node is for a command to hang. A command can appear to hang, even though the system seems to be operating correctly. In such a case, a message similar to the following can be generated at the console:

NIS: server not responding for domain domainname. Still trying

This error message indicates that the ypbind daemon on the local machine is unable to communicate with the ypserv daemon in the given domain because systems that run the ypserv daemon have failed. It may also occur if the network or the NIS server machine is overloaded to the extant that the ypserv daemon cannot return a response to your ypbind daemon within the time-out period.

Under these circumstances, all the other NIS clients on your network show the same or similar problems. The condition is usually temporary. The messages are cleared when the NIS server machine reboots and the ypserv daemon restarts, or else when the load on the NIS server and the network decreases.

If the ypbind daemon is communicating with the ypserv daemon and the NIS server is not overloaded, one of the following problems may exist:

  • The domainname on the NIS client machine is not set or is set incorrectly. Clients must use a domain name that the NIS servers recognize. The domain name is case-sensitive and initially set with lowercase letters. If this is case, set the domain correctly.
  • Your local network may not have an NIS server machine. One way for the NIS client to bind to a server is to broadcast on the net for servers to bind to. The disadvantage to this is that it only works on the subnet, and it can result in a storm traffic when a server stops and the clients attempt to rebind. Another method is to use ypset command to specify a NIS server to bind to. This has the advantage of allowing a client to bind to a server on a remote network, but it must be repeated after each reboot. The preferred method is to create the /var/yp/binding/<domain_name>/ypservers file. This file contains a list of server IP addresses to attempt to bind to, one server IP address per line. The client will attempt to bind to one of the specified servers before attempting to locate one using a broadcast. If the currently bound server that is down is also listed in the file, by default the client will attempt to contact it. However, if the YPBIND_SKIP environment variable is set to 1 (usually set in the /etc/environment file) before the ypbind daemon is started, the server that is currently down will not be contacted again.
  • The NIS server may not be up and running. Check other machines on your local network. If several clients have problems simultaneously, the server may be the cause.
    On a client system that is working normally, run the ypwhich command. If the ypwhich command never returns an answer, stop the command. Then type the following at the NIS server machine:
    ps -ef | grep yp

    Look for the ypserv and ypbind processes. If the server's ypbind daemon is not running, start the daemon, using the instructions in Starting and Stopping NIS Daemons.

    If a ypserv process is running, run the ypwhich command on the NIS server machine. If this command returns no answer, stop and restart the ypserv daemon by following the instructions in .