教育/培训LinuxAIXntp

linux系统做ntp服务器,aix 双击都做ntp客户机,同步时间问题

各位专家,
小弟最近在做ntp时间同步的相关工作。目前遇到一个棘手的问题,无法解决,特来此处请专家会诊!!

现象描述:

采用一台pc server 用vmware虚拟成两台主机,用其中一台机器安装linux系统,用来做ntp服务器。

与其同步的客户机有aix系统,windows 2003 及h3c 交换机等。

目前唯独aix 的两台做双机热备的机器无法同ntp时间服务器同步时间。

ntp时间服务器配置为:其ip地址为:192.168.112.251

restrict 192.168.112.0 mask 255.255.255.0 nomodify notrap
restrict 172.16.0.0 mask 255.255.0.0 nomodify notrap
restrict 192.168.200.0 mask 255.255.255.0 nomodify notrap
restrict 192.168.100.0 mask 255.255.255.0 nomodify notrap
restrict 192.200.10.0 mask 255.255.255.0 nomodify ntrap
restrict 192.200.10.0 mask 255.255.255.0 nomodify ntrap
restrict 192.200.20.0 mask 255.255.255.0 nomodify ntrap
restrict 192.200.100.0 mask 255.255.255.0 nomodify ntrap
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
#server 0.rhel.pool.ntp.org
#server 1.rhel.pool.ntp.org
#server 2.rhel.pool.ntp.org

#broadcast 192.168.1.255 key 42         # broadcast server
#broadcastclient                        # broadcast client
#broadcast 224.0.1.1 key 42             # multicast server
#multicastclient 224.0.1.1              # multicast client
#manycastserver 239.255.254.254         # manycast server
#manycastclient 239.255.254.254 key 42  # manycast client

# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available.
server  127.127.1.0     # local clock
fudge   127.127.1.0 stratum 10


aix小机的ntp.conf 配置为:

#broadcastclient
server 192.168.112.251
driftfile /etc/ntp.drift
tracefile /etc/ntp.trace


小机的xntpd 进程开启。但是执行lssrc -ls xntpd

始终显示:

Program name:    /usr/sbin/xntpd
Version:         3
Leap indicator:  11 (Leap indicator is insane.)
Sys peer:        no peer, system is insane


xnptdc -c peers 显示:

# xntpdc -c peers
     remote           local      st poll reach  delay   offset    disp
=======================================================================
=192.168.112.251 192.168.112.7   11   64    1 0.00049  0.037045 15.8750




npt服务器和aix小机都在同一个网段,没有做防火墙限制。

现在insane 始终改变不过来,不知道原因 。。。请教各位啦!!
参与16

15同行回答

bbl271685939bbl271685939系统工程师神州数码
it 三板斧...果然厉害   但是下次碰到同样的问题怎么办 ?显示全部
it 三板斧...果然厉害   但是下次碰到同样的问题怎么办 ?收起
系统集成 · 2011-11-28
浏览3399
sxallensxallen工程师长安大学
今天重新安装了ntp服务器,更换了linux的版本,由原来的redhat 9 更换成redhat 4.7企业版,成功实现了时间同步,问题解决。但原因还不太清楚!总结下:查找原因话费了一大半的时间,而重新安装,仅仅花了1、2个小时,问题解决。看来it三板斧还是比较厉害的。哈哈 ,重启,重装,断电。。。...显示全部
今天重新安装了ntp服务器,更换了linux的版本,由原来的redhat 9 更换成redhat 4.7企业版,成功实现了时间同步,问题解决。但原因还不太清楚!

总结下:查找原因话费了一大半的时间,而重新安装,仅仅花了1、2个小时,问题解决。

看来it三板斧还是比较厉害的。哈哈 ,重启,重装,断电。。。收起
教育/培训 · 2011-09-21
浏览3272
zhenzongjianzhenzongjian软件开发工程师na
蹊跷的ntp时间同步显示全部
蹊跷的ntp时间同步收起
互联网服务 · 2011-09-21
浏览3271
feidaodaofeidaodao系统运维工程师GA
回复  mp3www     但是用 lssrc -ls xntpd 结果如下:# lssrc -ls xntpd Program name:    /usr/sbin ...sxallen 发表于 2011-9-20 15:40 嘛这么奇怪ntpdate正常lssrc的lead是11,sys peer是16------------------------------》16是未同步状...显示全部
回复  mp3www


    但是用 lssrc -ls xntpd 结果如下:

# lssrc -ls xntpd
Program name:    /usr/sbin ...
sxallen 发表于 2011-9-20 15:40



嘛这么奇怪

ntpdate正常

lssrc的
lead是11,sys peer是16------------------------------》16是未同步状态
但refer id和refer time都是有值的  -------------------》有值是同步状态呀

不知道你是嘛情况。
你对比一下官网配置,是不是这样做的,在检查一下
https://www-304.ibm.com/support/docview.wss?uid=isg3T1000653收起
金融其它 · 2011-09-20
浏览3319
sxallensxallen工程师长安大学
回复 6# feidaodao     messages 里边的内容:Sep 20 16:37:46 localhost ntpd[16850]: ntpd exiting on signal 15Sep 20 16:37:47 localhost ntpd[22781]: ntpd [email]4.2.2p1@1.1570[/email]-o Wed Sep  3 14:28:15 UTC 2008 (1)Sep 20 16:37:47 l...显示全部
回复 6# feidaodao


    messages 里边的内容:

Sep 20 16:37:46 localhost ntpd[16850]: ntpd exiting on signal 15
Sep 20 16:37:47 localhost ntpd[22781]: ntpd [email]4.2.2p1@1.1570[/email]-o Wed Sep  3 14:28:15 UTC 2008 (1)
Sep 20 16:37:47 localhost ntpd[22782]: precision = 1.000 usec
Sep 20 16:37:47 localhost ntpd[22782]: Listening on interface wildcard, 0.0.0.0#123 Disabled
Sep 20 16:37:47 localhost ntpd[22782]: Listening on interface wildcard, ::#123 Disabled
Sep 20 16:37:47 localhost ntpd[22782]: Listening on interface lo, ::1#123 Enabled
Sep 20 16:37:47 localhost ntpd[22782]: Listening on interface eth0, fe80::20c:29ff:feda:aa34#123 Enabled
Sep 20 16:37:47 localhost ntpd[22782]: Listening on interface lo, 127.0.0.1#123 Enabled
Sep 20 16:37:47 localhost ntpd[22782]: Listening on interface eth0, 192.168.112.251#123 Enabled
Sep 20 16:37:47 localhost ntpd[22782]: kernel time sync status 0040
Sep 20 16:37:47 localhost ntpd[22782]: configure: keyword "ntrap" unknown, line ignored
Sep 20 16:37:47 localhost last message repeated 3 times
Sep 20 16:37:47 localhost ntpd[22782]: Cannot open log file /var/log/ntp/ntp.log
Sep 20 16:37:47 localhost ntpd[22782]: frequency initialized 0.000 PPM from /var/lib/ntp/drift
Sep 20 16:41:01 localhost ntpd[22782]: synchronized to LOCAL(0), stratum 10
Sep 20 16:41:01 localhost ntpd[22782]: kernel time sync enabled 0001收起
教育/培训 · 2011-09-20
浏览3431
sxallensxallen工程师长安大学
回复 6# feidaodao 1、aix 和linux的机器时间差别几秒钟之内,应该不需要在手动修改;2、我是在linux ntp服务器启动后足够长时间后启动aix客户端的。这块,我测试过好多次,一般只要等待10分钟,就差不多了;3、用ntpq -q 查询,aix显示服务器无法连接状态,因为服务器ip地址前无“*”符...显示全部
回复 6# feidaodao

1、aix 和linux的机器时间差别几秒钟之内,应该不需要在手动修改;

2、我是在linux ntp服务器启动后足够长时间后启动aix客户端的。这块,我测试过好多次,一般只要等待10分钟,就差不多了;

3、用ntpq -q 查询,aix显示服务器无法连接状态,因为服务器ip地址前无“*”符号。具体如下:
aix 如下:
# ntpq -p
     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
192.168.112.251 LOCAL(0)         3 u   40   64    7     0.34  110.182 3911.73

linux 如下:
[root@localhost log]# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
192.168.255.20  .INIT.          16 u    - 1024    0    0.000    0.000   0.000
*LOCAL(0)        .LOCL.           2 l   62   64  377    0.000    0.000   0.001
[root@localhost log]#收起
教育/培训 · 2011-09-20
浏览3138
sxallensxallen工程师长安大学
用 lssrc -ls xntpd 始终显示:Leap indicator:  11 (Leap indicator is insane.) Sys peer:        no peer, system is insane Sys stratum:     16显示全部
用 lssrc -ls xntpd 始终显示:

Leap indicator:  11 (Leap indicator is insane.)
Sys peer:        no peer, system is insane
Sys stratum:     16收起
教育/培训 · 2011-09-20
浏览3105
sxallensxallen工程师长安大学
回复 5# mp3www     但是用 lssrc -ls xntpd 结果如下:# lssrc -ls xntpd Program name:    /usr/sbin/xntpd Version:         3 Leap indicator:  11 (Leap indicator is insane.) Sys peer:  &nb...显示全部
回复 5# mp3www


    但是用 lssrc -ls xntpd 结果如下:

# lssrc -ls xntpd
Program name:    /usr/sbin/xntpd
Version:         3
Leap indicator:  11 (Leap indicator is insane.)
Sys peer:        no peer, system is insane
Sys stratum:     16
Sys precision:   -16
Debug/Tracing:   DISABLED
Root distance:   0.000351
Root dispersion: 1.130096
Reference ID:    192.168.112.251
Reference time:  d222ca50.f86c7000  Tue, Sep 20 2011 16:16:16.970
Broadcast delay: 0.003906 (sec)
Auth delay:      0.000122 (sec)
System flags:    pll monitor filegen  
System uptime:   259054 (sec)
Clock stability: 0.000107 (sec)
Clock frequency: 0.000000 (sec)
Peer: 192.168.112.251
      flags: (configured)
      stratum:  3, version: 3
      our mode: client, his mode: server
Subsystem         Group            PID          Status
xntpd            tcpip            1077336      active
#收起
教育/培训 · 2011-09-20
浏览3279
sxallensxallen工程师长安大学
回复 5# mp3www     # ntpdate -d 192.168.112.25120 Sep 16:19:05 ntpdate[213358]: 3.4ytransmit(192.168.112.251)receive(192.168.112.251)transmit(192.168.112.251)receive(192.168.112.251)transmit(192.168.112.251)receive(192.168.112.251)transmit(...显示全部
回复 5# mp3www


    # ntpdate -d 192.168.112.251
20 Sep 16:19:05 ntpdate[213358]: 3.4y
transmit(192.168.112.251)
receive(192.168.112.251)
transmit(192.168.112.251)
receive(192.168.112.251)
transmit(192.168.112.251)
receive(192.168.112.251)
transmit(192.168.112.251)
receive(192.168.112.251)
transmit(192.168.112.251)
server 192.168.112.251, port 123
stratum 3, precision -20, leap 00, trust 000
refid [127.127.1.0], delay 0.02577, dispersion 0.00005
transmitted 4, in filter 4
reference time:      d222cadb.71c831c1  Tue, Sep 20 2011 16:18:35.444
originate timestamp: d222cafa.1e94fb98  Tue, Sep 20 2011 16:19:06.119
transmit timestamp:  d222cafa.05b82000  Tue, Sep 20 2011 16:19:06.022
filter delay:  0.02713  0.02579  0.02582  0.02577
               0.00000  0.00000  0.00000  0.00000
filter offset: 0.096590 0.097021 0.097011 0.097019
               0.000000 0.000000 0.000000 0.000000
delay 0.02577, dispersion 0.00005
offset 0.097019

20 Sep 16:19:06 ntpdate[213358]: adjust time server 192.168.112.251 offset 0.097019
#收起
教育/培训 · 2011-09-20
浏览3161
luyulingluyuling系统工程师北京爱必克微电子技术有限公司
先手动更新一下,试试。行的话,就是客户端有问题,反之,就是server端。显示全部
先手动更新一下,试试。行的话,就是客户端有问题,反之,就是server端。收起
系统集成 · 2011-09-15
浏览3184

提问者

sxallen
工程师长安大学

相关问题

相关资料

相关文章

问题状态

  • 发布时间:2011-09-10
  • 关注会员:1 人
  • 问题浏览:18437
  • 最近回答:2011-11-28
  • X社区推广