我有一个基于Linux的Linux(Linux版本2.6.32.11-svn70860),它不能使用ntp设置它的时间。 以前的系统pipe理员早已不在了,所以我不知道这个问题刚刚开始发生,还是多年来一直如此。 我也在联系制造商,但是对他们的技术支持没有太大的信心 – 这就是我来到这里的原因!
在/var/log/daemon.log我看到这样的行:
Jan 13 09:28:37 ntpdate[16529]: can't find host pool.ntp.org Jan 13 09:28:37 ntpdate[16529]: can't find host time.windows.com Jan 13 09:28:37 ntpdate[16529]: can't find host pool.ntp.org Jan 13 09:28:37 ntpdate[16529]: no servers can be used, exiting
所以我开始调查ntpdate。 如果我执行
ntpdate pool.ntp.org
它回应
Error : Name or service not known 16 Jan 09:16:38 ntpdate[22019]: can't find host pool.ntp.org 16 Jan 09:16:38 ntpdate[22019]: no servers can be used, exiting
但如果我执行
ping pool.ntp.org
它回应
PING pool.ntp.org (207.32.191.59) 56(84) bytes of data. 64 bytes from 207.32.191.59: icmp_seq=1 ttl=56 time=97.1 ms 64 bytes from 207.32.191.59: icmp_seq=2 ttl=56 time=97.0 ms 64 bytes from 207.32.191.59: icmp_seq=3 ttl=56 time=97.4 ms
这让我觉得互联网连接,IPconfiguration,DNS等都没有问题。
我从哪里出发?
更新1
nslookup pool.ntp.org
回报
;; Got recursion not available from ABCD, trying next server Server: 205.171.2.65 Address: 205.171.2.65#53 Non-authoritative answer: Name: pool.ntp.org Address: 209.114.111.1 Name: pool.ntp.org Address: 173.242.114.154 Name: pool.ntp.org Address: 204.235.61.9 Name: pool.ntp.org Address: 64.6.144.6
ABCD是我们公司内部的一个IP地址,不知道为什么它显示出来。
更新2
我读了关于nslookup被弃用的赞成挖,所以我试了一下。
dig pool.ntp.org ; <<>> DiG 9.5.1-P3 <<>> pool.ntp.org ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 56646 ;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; WARNING: recursion requested but not available ;; QUESTION SECTION: ;pool.ntp.org. IN A ;; Query time: 50 msec ;; SERVER: ABCD#53(ABCD) ;; WHEN: Thu Jan 16 11:03:40 2014 ;; MSG SIZE rcvd: 30
其中ABCD是相同的内部名称服务器。
解决scheme:负责DNS服务器的人员必须启用recursion。