NTPD同步失败问题
来源:互联网 发布:华三交换机进入端口 编辑:程序博客网 时间:2024/05/16 12:15
#ps -ef | grep ntpntp 41939 1 0 14:46 ? 00:00:00 /usr/sbin/ntpd -p /var/run/ntp/ntpd.pid -g -u ntp:ntp -i /var/lib/ntp -I 10.170.65.54 -c /etc/ntp.conf
连续运行命令多次, 发现when的值一直是"-",而不是递增数字。通常情况下,when值会一直增加到poll值,然后同步一次。#ntpq -p
remote refid st t when poll reach delay offset jitter============================================================================== 10.170.65.54 .INIT. 16 - - 1024 0 0.000 0.000 0.000
google了一把,得知这些restrict是使客户端连本机受限,只有目标网段客户端才能连上本机ntp server。那么显然对这个问题无关紧要,但是保险起见,都注掉了。而且去我们的ntp server那边也检查了ntp.conf,确保ntp server是绑定所有网卡的123UDP端口(NTP默认端口)。#server 2001:1b70:200:105b:505::9#server 2001:1b70:200:105b:1505::9restrict default ignorerestrict -6 default ignorerestrict -6 2001:1b70:200:105b:505::9 mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff nomodify notrap nopeerrestrict -6 2001:1b70:200:105b:1505::9 mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff nomodify notrap nopeerrestrict -6 2001:1b70:200:1026::132:135 mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff nomodify notrap nopeerrestrict -6 2001:1b70:200:1026::132:84 mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff nomodify notrap nopeerrestrict -6 2001:1b70:200:1026::132:131 mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff nomodify notrap nopeerrestrict -6 2001:1b70:200:1026::132:132 mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff nomodify notrap nopeerrestrict 127.0.0.1 nomodify notrap nopeerrestrict ::1 nomodify notrap nopeer
这里发现stop以后,进程一直在!说明stop有问题。那么我kill掉重新start,问题依旧。#cd /etc/init.d/
#./ntp stop
#./ntp status
#./ntp start
看到连54的时候报 'unreach’ 事件。奇怪了……#cd /usr/sbin/
#ntpd -d
ntpd 4.2.4p8@1.1612-o Thu Nov 22 17:43:27 UTC 2012 (1)addto_syslog: precision = 1.000 usecaddto_syslog: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16addto_syslog: Listening on interface #0 wildcard, 0.0.0.0#123 Disabledaddto_syslog: Listening on interface #1 wildcard, ::#123 Disabledaddto_syslog: Listening on interface #2 vlan6, 2001:1b70:206:1029::132:116#123 Enabledaddto_syslog: Listening on interface #3 vlan6, fe80::6e3b:e5ff:feba:ab#123 Enabledaddto_syslog: Listening on interface #4 vlan5, 2001:1b70:205:1029::132:116#123 Enabledaddto_syslog: Listening on interface #5 vlan4, 2001:1b70:204:1029::132:116#123 Enabledaddto_syslog: Listening on interface #6 vlan3, 2001:1b70:203:1029::132:116#123 Enabledaddto_syslog: Listening on interface #7 vlan2, 2001:1b70:202:1029::132:116#123 Enabledaddto_syslog: Listening on interface #8 vlan11, 2001:1b70:211:1029::132:116#123 Enabledaddto_syslog: Listening on interface #9 vlan1, 2001:1b70:201:1029::132:116#123 Enabledaddto_syslog: Listening on interface #10 vlan4, fe80::6e3b:e5ff:feba:a9#123 Enabledaddto_syslog: Listening on interface #11 eth4, fe80::6e3b:e5ff:feba:aa#123 Enabledaddto_syslog: Listening on interface #12 vlan2, fe80::6e3b:e5ff:feba:a8#123 Enabledaddto_syslog: Listening on interface #13 lo, ::1#123 Enabledaddto_syslog: Listening on interface #14 lo, 127.0.0.1#123 Enabledaddto_syslog: Listening on interface #15 lo, 127.0.0.2#123 Enabledaddto_syslog: Listening on interface #16 eth4, 10.175.132.116#123 Enabledaddto_syslog: Listening on interface #17 vlan3, 192.168.132.116#123 Enabledlocal_clock: time 0 offset 0.000000 freq 0.000 state 0addto_syslog: kernel time sync status 2040peer_crypto_clear: at 0 next 0 assoc ID 7487key_expire: at 0peer_clear: at 0 next 1 assoc ID 7487 refid INITnewpeer: 10.175.132.116->10.170.65.54 mode 3 vers 4 poll 6 10 flags 0x1 0x1 ttl 0 key 00000000addto_syslog: frequency initialized 0.000 PPM from /var/lib/ntp/drift/ntp.driftlocal_clock: time 0 offset 0.000000 freq 0.000 state 1report_event: system event 'event_restart' (0x01) status 'sync_alarm, sync_unspec, 1 event, event_unspec' (0xc010)transmit: at 1 10.175.132.116->10.170.65.54 mode 3auth_agekeys: at 1 keys 0 expired 0timer: refresh ts 0timer: interface updatereceive: at 1 10.175.132.116<-10.170.65.54 mode 4 code 1 auth 0peer 10.170.65.54 event 'event_reach' (0x84) status 'unreach, conf, 1 event, event_reach' (0x8014)clock_filter: n 1 off -0.006533 del 0.000129 dsp 7.937501 jit 0.000001, age 0
结果是好的……囧#ping 10.170.65.54
里面有段"...
startproc $NTPD_BIN -p ${NTPD_PID_NOPREFIX} $NTPD_OPTIONS -I 10.170.65.54 -c $NTP_CONF
...
而用ntpq -p检查状态却是#./ntp status
Checking for network time protocol daemon (NTPD): unused
说明同步已经正常,并且ntp server已被认证为基准同步server。remote refid st t when poll reach delay offset jitter==============================================================================*10.170.65.54 10.175.250.66 6 u 43 64 37 0.117 -8.719 2.853
- NTPD同步失败问题
- Linux 时间同步 ntpd
- ntpd 时间同步
- ntpd ntpdate时间同步
- freebsd ntpd 时间同步
- ntpd时钟同步服务
- 时间同步,ntpd、ntpdate
- 用ntpd做时间同步
- linux 时间同步、ntpd、ntpdate
- linux时间同步,ntpd、ntpdate
- linux时间同步,ntpd、ntpdate
- linux时间同步,ntpd、ntpdate
- linux时间同步,ntpd、ntpdate
- linux时间同步,ntpd、ntpdate
- linux时间同步,ntpd、ntpdate
- linux时间同步,ntpd、ntpdate
- linux时间同步,ntpd、ntpdate
- 配置ntpd时钟同步服务
- UIApplication Delegate消息 以及对applicationWillTerminate触发机制的误区
- 使用getopts处理Shell脚本参数 (转)
- Speed up Eclipse
- 补一些常用的SSL用的命令
- BM-SC MDF-CP Tricky Performance TR Analysis Process
- NTPD同步失败问题
- SUSE更新iptable信息
- Linux下禁止root用户远程登录的方法
- Suse Linux 多次登录失败锁定用户及解锁
- Java反射效率
- java反射机制基础详解(转)
- transient, volatile, strictfp
- Difference between Serializable and Externalizable in Java Serialization
- C++箴言:绝不在构造或析构期调用虚函数