プロが教える店舗&オフィスのセキュリティ対策術

表題の通りCentOSのNTPサーバーエラーについて質問します。

状況
CentOSでNTPを使用していたのですが、気がついた時には
NTPサーバーがエラーで止まっていました。 
内容を確認してみると、/etc/ntp.confで設定している同期するサーバーと
ntpq -p で確認するサーバーが違っている事に気が付きました。

このntpqコマンドで確認できるサーバーは、昔使っていた古いアドレスの物で
現在は使われていない為に今回のエラーになっていると考え、
設定されている場所を探したのですが、見つからなかった為、
yum erase ntp* で一旦全て削除して、 yum install ntp* で再インストールを
行いましたが、状態が変わりませんでした。

現在のntp.confの内容==============================================
# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
#restrict default kod nomodify notrap nopeer noquery
#restrict -6 default kod nomodify notrap nopeer noquery
# Permit all access over the loopback interface. This could# be tightened as well, but to do so would effect some o
f# the administrative functions.#restrict 127.0.0.1 #restrict -6 ::1
#ipv6
# Hosts on local network are less restricted.

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
#server 0.centos.pool.ntp.org
#server 1.centos.pool.ntp.org
#server 2.centos.pool.ntp.org
server 133.100.9.2 #clock.nc.fukuoka-u.ac.jp
server 210.173.160.27 #ntp1.jst.mfeed.ad.jp
server 202.224.32.4 #ntp.asahi-net.or.jp

#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

# Drift file. Put this in a directory which the daemon can write to.
# No symbolic links allowed, either, since the daemon updates the file
# by creating a temporary in the same directory and then rename()'ing
# it to the file.
driftfile /var/lib/ntp/drift

# Key file containing the keys and key identifiers used when operating
# with symmetric key cryptography.
keys /etc/ntp/keys

# Specify the key identifiers which are trusted.
#trustedkey 4 8 42

# Specify the key identifier to use with the ntpdc utility.
#requestkey 8

# Specify the key identifier to use with the ntpq utility.
#controlkey 8
========================================================

ntpq -p で確認した内容====================================
remote refid st t when poll reach delay offset jitter
==============================================================================
clock.nc.fukuok .GPS. 1 u 45 64 1 25.585 22436.7 0.002
ntp1.jst.mfeed. 210.173.176.251 2 u 44 64 1 5.803 22465.5 0.002
orion.asahi-net 133.243.238.244 2 u 43 64 1 5.787 22495.2 0.002
==============================================================================

この時、/var/log/messageには何もログは表示されていません。

また、ntpdate -u -b clock.nc.fukuoka-u.ac.jp で強制的に時刻同期させると
以下のように時刻の同期ができます。
29 Sep 22:17:15 ntpdate[29572]: step time server 133.100.9.2 offset 27.863054 sec


以上の内容から、ntpq -p で表示されている古いサーバー情報がどこかに
残っている為に、今回のエラーになっていると思えるのですが、
自分では、どこに残っているのかがわからない為、
皆様のお知恵をお借りできれば幸いです。

宜しくお願い致します。

A 回答 (2件)

>以上の内容から、ntpq -p で表示されている古いサーバー情報がどこかに


(略)

指定しているntpサーバーに接続しているようにしか見えませんけど、
古いサーバー情報って以下の3つのどれのことでしょうか?

>clock.nc.fukuok .GPS. 1 u 45 64 1 25.585 22436.7 0.002
>ntp1.jst.mfeed. 210.173.176.251 2 u 44 64 1 5.803 22465.5 0.002
>orion.asahi-net 133.243.238.244 2 u 43 64 1 5.787 22495.2 0.002

IPアドレス逆引きする限りおかしくありませんし。

>$ nslookup 133.100.9.2
>Server: 192.168.0.16
>Address: 192.168.0.16#53

>Non-authoritative answer:
>2.9.100.133.in-addr.arpa name = clock.nc.fukuoka-u.ac.jp.

>Authoritative answers can be found from:
>100.133.in-addr.arpa nameserver = ns-a.net.fukuoka-u.ac.jp.
>100.133.in-addr.arpa nameserver = ns-b.net.fukuoka-u.ac.jp.
>ns-a.net.fukuoka-u.ac.jp internet address = 133.100.240.10
>ns-b.net.fukuoka-u.ac.jp internet address = 133.100.240.11

>$ nslookup 210.173.160.27
>Server: 192.168.0.16
>Address: 192.168.0.16#53

>Non-authoritative answer:
>27.160.173.210.in-addr.arpa name = ntp1.jst.mfeed.ad.jp.

>Authoritative answers can be found from:
>160.173.210.in-addr.arpa nameserver = ns1.mfeed.ad.jp.
>160.173.210.in-addr.arpa nameserver = ns.mfeed.ad.jp.
>160.173.210.in-addr.arpa nameserver = ns0.mfeed.ad.jp.
>ns.mfeed.ad.jp internet address = 210.173.160.19
>ns0.mfeed.ad.jp internet address = 210.173.160.52
>ns1.mfeed.ad.jp internet address = 210.173.160.66

>$ nslookup ntp.asahi-net.or.jp
>Server: 192.168.0.16
>Address: 192.168.0.16#53

>Non-authoritative answer:
>ntp.asahi-net.or.jp canonical name = orion.asahi-net.or.jp.
>Name: orion.asahi-net.or.jp
>Address: 202.224.32.4

また、clock.nc.fukuoka-u.ac.jpは使用しないようにしましょう。
一般ユーザーの使用するとこではないです。
理由は ntp 福岡大学 で検索して調べてみてください。
    • good
    • 0

既に指摘されているとおりで…単純に福岡大学から拒否られているだけなんじゃないですか?



ntpdateでは1回の問い合わせだけなのでフィルタリングに引っかかっていないだけかと思いますが。
# というか…27秒もズレるってのもすごいですね…。

ウチでは…
ntp.jst.mfeed.ad.jp、ISPのNTPサーバ、ats1.e-timing.ne.jp、3.asia.pool.ntp.org、ntp.t.ring.gr.jp
を指定しています。
ntpqで見ると3.asia.pool.ntp.orgは同期できていないようです。
# 外すか…。

LAN内部の他のサーバは上位サーバとして上記の設定をしてあるサーバを(優先的に)参照するようにしていますね。
    • good
    • 0
この回答へのお礼

福岡のNPTサーバーをはずしてみて様子を見る事にしました。
今のところ、ntpq -p で確認していると、どんどんoffset値が
増えていくのですが、1~2時間程見てから判断したいと思います

ちなみにdateで確認すると全然時刻がずれていないので
まだntpq -pコマンドで表示される内容を詳しく知る必要が
あるようです。

素早いアドバイスありがとうございました。
一旦質問を締めて、調べて様子をみた上で、直らなければ
再度質問させていただきたいと思います。

お礼日時:2012/09/30 07:12

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!