天天看点

Why do some of the network services fail at boot time but work once Red Hat Enterprise Linux system

环境

  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 4
  • initscripts(/etc/init.d/network)

问题

  • Some services that require network connectivity do not start properly during system boot, but they can be started manually once the system is up and running.
  • NIS service does not start at boot. Once the server is up and running, the NIS service can be started with out any issues. /var/log/messages shows the following error messages at boot time:

    Raw

    Jul 27 08:37:33 server1 ypbind: Host name lookup failure Jul 27 08:38:27 server1 ypbind[8554]: broadcast: RPC: Timed out.

决议

A workaround for these issues is to introduce a delay at the end of the start function in the network init script , Using the ​

​NETWORKDELAY​

​ global parameter.

To do that, edit the ​

​/etc/sysconfig/network​

​ file and add the following:

​​Raw​​

NETWORKDELAY=60
      

Start with a high delay of 60 seconds. If this solves the problem, then progressively lower the value until the lowest value at which all network services continue to start is found (This will take some testing to find the magic number). For some systems a value as low as 10 will do the trick, for others a higher value may be needed.

  • One possibility is the use of Spanning Tree on the network, which could delay network initialization on the system.
  • Another issue is a known problem with some network cards where networking is "advertised" to the system as being fully started, when in fact it has not. This problem stems from the fact that the network card itself takes an unusually long time to initialize. This results in network dependent services trying to start before the network is ready to accommodate them.

继续阅读