ntp同步报错解决

Posted effortsing

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ntp同步报错解决相关的知识,希望对你有一定的参考价值。

服务端:192.168.1.204  www.test.com

客户端:192.168.1.206  www.test3.com

客户端同步服务端报错如下:

[[email protected] etc]# ntpdate -d -b 192.168.1.204
9 Dec 22:42:10 ntpdate[10293]: ntpdate [email protected] Fri Apr 13 12:52:28 UTC 2018 (1)
Looking for host 192.168.1.204 and service ntp
host found : bogon
transmit(192.168.1.204)
transmit(192.168.1.204)
transmit(192.168.1.204)
transmit(192.168.1.204)
transmit(192.168.1.204)
192.168.1.204: Server dropped: no data
server 192.168.1.204, port 123
stratum 0, precision 0, leap 00, trust 000
refid [192.168.1.204], delay 0.00000, dispersion 64.00000
transmitted 4, in filter 4
reference time: 00000000.00000000 Sun, Dec 31 1899 19:00:00.000
originate timestamp: 00000000.00000000 Sun, Dec 31 1899 19:00:00.000
transmit timestamp: dfb85f18.7c676b92 Sun, Dec 9 2018 22:42:16.485
filter delay: 0.00000 0.00000 0.00000 0.00000
0.00000 0.00000 0.00000 0.00000
filter offset: 0.000000 0.000000 0.000000 0.000000
0.000000 0.000000 0.000000 0.000000
delay 0.00000, dispersion 64.00000
offset 0.000000

9 Dec 22:42:18 ntpdate[10293]: no server suitable for synchronization found

 

解决:

配置192.168.1.206的 hosts 添加服务端的ip地址和域名即可解决

sed -i ‘$a192.168.1.204  www.test.com‘ /etc/hosts

再次同步成功

[[email protected] etc]# ntpdate -d -b 192.168.1.204
9 Dec 22:50:33 ntpdate[10835]: ntpdate [email protected] Fri Apr 13 12:52:28 UTC 2018 (1)
Looking for host 192.168.1.204 and service ntp
host found : www.test.com
transmit(192.168.1.204)
receive(192.168.1.204)
transmit(192.168.1.204)
receive(192.168.1.204)
transmit(192.168.1.204)
receive(192.168.1.204)
transmit(192.168.1.204)
receive(192.168.1.204)
server 192.168.1.204, port 123
stratum 2, precision -25, leap 00, trust 000
refid [192.168.1.204], delay 0.02643, dispersion 0.00026
transmitted 4, in filter 4
reference time: dfb8603a.eb00f583 Sun, Dec 9 2018 22:47:06.917
originate timestamp: dfb8610f.7f3f2a5e Sun, Dec 9 2018 22:50:39.497
transmit timestamp: dfb8610f.802d9b91 Sun, Dec 9 2018 22:50:39.500
filter delay: 0.03288 0.02699 0.02654 0.02643
0.00000 0.00000 0.00000 0.00000
filter offset: -0.00560 -0.00401 -0.00404 -0.00417
0.000000 0.000000 0.000000 0.000000
delay 0.02643, dispersion 0.00026
offset -0.004177

9 Dec 22:50:39 ntpdate[10835]: step time server 192.168.1.204 offset -0.004177 sec

 















































以上是关于ntp同步报错解决的主要内容,如果未能解决你的问题,请参考以下文章

Linux中使用ntpdate同步失败报错:14 Apr 08:42:12 ntpdate[1255]: the NTP socket is in use, exiting:解决方法.

解决Linux 服务器ntpdate同步时间报错 the NTP socket is in use, exiting

Puppet报错汇总

ntp服务问题

线上生产环境同步时间服务器时报错the NTP socket is in use, exiting

ntp服务器日志报错