Linux:Ntp同步时间服务器报错no server suitable for synchronization found
Linux:Ntp同步时间服务器报错no server suitable for synchronization found环境描述:公司老服务器使用的还是Centos6.5系统,zabbix是不是告警时间与zabbix server有差异,zabbix差异超过一分钟即告警。Linux服务器运行久时,系统时间就会存在一定的误差,一般情况下可以使用date命令进行时间设置,但在做数据库集群分片等操作
Linux:Ntp同步时间服务器报错no server suitable for synchronization found
环境描述:
公司老服务器使用的还是Centos6.5系统,zabbix是不是告警时间与zabbix server有差异,zabbix差异超过一分钟即告警。
Linux服务器运行久时,系统时间就会存在一定的误差,一般情况下可以使用date命令进行时间设置,但在做数据库集群分片等操作时对多台机器的时间差是有要求的,此时就需要使用ntpdate进行时间同步
登录服务器使用ntpdate 命令同步时间报错:
[root@localhost ~]# ntpdate ntp1.aliyun.com
8 Jan 09:46:13 ntpdate[18303]: no server suitable for synchronization found
解决办法:
ntpdate 加上-u 参数同步
例:ntpdate -u ntp-server/ip
[root@localhost ~]# ntpdate -u ntp1.aliyun.com
8 Jan 09:50:59 ntpdate[18773]: step time server 202.112.10.36 offset 60.085833 sec
[root@localhost ~]# date
2021年 01月 08日 星期五 09:51:02 CST
加入crontab
echo "*/20 * * * * /usr/sbin/ntpdate -u ntp.api.bz >/dev/null &" >> /var/spool/cron/root
ntp常用服务器
中国国家授时中心:210.72.145.44
NTP服务器(上海) :ntp.api.bz
经测试中国国家授时中心与NTP上海服务器可以正常同步时间,注意需要加上-u参数!
ntpdate -u ntp.api.bz
ntpdate -u 210.72.145.44
国外:
美国:time.nist.gov
复旦:ntp.fudan.edu.cn
微软公司授时主机(美国) :time.windows.com
台警大授时中心(台湾):asia.pool.ntp.org
date命令
date :查看当前时间,结果如下:Tue Mar 4 01:36:45 CST 2014
date -s 09:38:40 :设置当前时间,结果如下:Tue Mar 4 09:38:40 CST 2014
一些常用NTP服务器
参考:https://www.cnblogs.com/luchuangao/p/7795293.html#top
更多推荐
所有评论(0)