[root@hadoop103 ~]# /usr/sbin/ntpdate hadoop102
29 Jan 23:53:17 ntpdate[2819]: no server suitable for synchronization found
You have new mail in /var/spool/mail/root
一、检查NTP服务端的防火墙是否开放NTP服务端口:udp 123
先关闭防火墙测试:
service iptables stop (centos 6)
执行以上命令关闭NTP服务端的防火墙,然后再进行NTP时间同步,如果成功,则需要修改iptables的设置,以开放NTP服务端口。
# 53是dns端口
iptables -A INPUT -p udp -m multiport --sport 53,123 -j ACCEPT
/etc/init.d/iptables save
/etc/init.d/iptables restart