事因:因为某台服务器上面时间和实际时间差了将近一分钟(可以使用 date 命令查看时间)。CentOS 上常用的时间同步是 ntpdate,但是这台服务器一直报 no server suitable for synchronization found,无奈放弃。
不过好在还可以使用 rdate 同步。
安装 rdate
使用如下命令安装
yum install rdate
rdate 用法
rdate [-p] [-s] [-u] [-l] [-t sec] [host…]
选项
-p Print the time returned by the remote machine.
-s Set the system time to the returned time.
-u Use UDP instead of TCP as the transport.
-l Use syslog to output errors (cron.warning) and output (cron.info).
-t Set timeout in seconds for every attempt to retrieve date.
使用 man rdate 可以查看
rdate同步时间
rdate -s time-b.nist.gov
下面附送系列时间服务器的列表, 有的不一定可以使用哈
time.nist.gov
time-b.nist.gov
216.118.116.105
rdate.darkorb.net
202.106.196.19
time-b.timefreq.bldrdoc.gov