https://access.redhat.com/solutions/7336
SOLUTION 已验证 - 已更新 2019年四月5日08:56 -
环境
- 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:
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:
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.
Reboot after making this change and take note during the boot process. There should be a long delay when the network service is starting up. After that, other network dependent services such as ntpd and NFS should start normally. The next step will be to experiment with values lower than 60 until the lowest value that continues to allow all network services to start is found.
If you use NetworkManager service, refer Network services start before ethernet devices are up in Red Hat Enterprise Linux.
根源
There are multiple possible causes for this type of issue.
-
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.