
Ubuntu日本語フォーラム

ログインしていません。
環境は、Ubuntu Server 9.10で
ルーターの設定で、Port 123/udpは開放済みですが、
外部からWindowsで同期しようとすると、(アドレス)に同期中にエラーが発生しました。タイムサンプルは拒否されました。ピアの階層はホストの階層より少ないです。と出て失敗します。
muninの、ntp_offsetでも、グラフが完全に途切れています。
以下----/etc/ntp.confの内容-----
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
driftfile /var/lib/ntp/ntp.drift
# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
# You do need to talk to an NTP server or two (or three).
server ntp.nict.jp
server ntp.nict.jp
server ntp.nict.jp
# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
# details. The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions>
# might also be helpful.
#
# Note that "restrict" applies to both servers and clients, so a configuration
# that might be intended to block requests from certain clients could also end
# up blocking replies from your own upstream servers.
# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
# Local users may interrogate the ntp server more closely.
restrict 255.255.255.255
restrict ::1
# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
restrict 192.168.123.0 mask 255.255.255.0 nomodify notrap
# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)
#broadcast 192.168.123.255
# If you want to listen to time broadcasts on your local subnet, de-comment the
# next lines. Please do this only if you trust everybody on the network!
#disable auth
#broadcastclient
オフライン
remote refid st t when poll reach delay offset jitter
==============================================================================
ntp-a3.nict.go. .RMOT. 16 u - 1024 0 0.000 0.000 0.000
ntp-a2.nict.go. .INIT. 16 u - 1024 0 0.000 0.000 0.000
こうなりました
同期している様子がありません。
オフライン
#3のfono09さん
まずは、パッケージのオリジナルの/etc/ntpd.confで試してみては?
私の環境では、ntpd.confは一切編集せず、10分くらい放置すると時刻同期されますよ。
>ルーターの設定で、Port 123/udpは開放済み
>外部からWindowsで同期しようと
ローカルLAN内での同期では無く、グローバルアドレスを使っての同期ですか?
(この場合は、Ubuntu 、 Win で、同じ公開ntpサーバを使う様にしたほうが面倒無くて言いような気がしますが?)
Ubuntuサーバはよく分からないのですが、サーバのポートは開いてますか?
変に、アクセス制限されて無いですか?
( restrict 192.168.123.0 mask 255.255.255.0 nomodify notrap とか)
設定変更して、サーバ再起動しましたか?
オフライン
apt-get remove --purge ntp
apt-get install ntp
とやって、
オリジナルのntp.confに server ntp.nict.jp を2行加えて
ntpq -pをしてみたところ
remote refid st t when poll reach delay offset jitter
==============================================================================
ntp-a3.nict.go. .INIT. 16 u - 64 0 0.000 0.000 0.000
ntp-a2.nict.go. .INIT. 16 u - 64 0 0.000 0.000 0.000
europium.canoni 193.79.237.14 2 u 10 64 1 263.578 6.399 0.002
こうなりまして、ntp.ubuntu.comとしか同期していないようです。
オフライン
server ntp.nict.jp ー> server -4 ntp.nict.jp
見落としてました。
オフライン
-4
IPv4なのでをつける必要があったんですね。完全に復活しました。
server -4 ntp.nict.jp
server -4 ntp.nict.jp
server ntp.ubuntu.com
にしたところ
# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
ntp-a2.nict.go. .NICT. 1 u 6 64 1 22.832 1.658 0.002
ntp-b2.nict.go. .NICT. 1 u 5 64 1 20.914 1.556 0.002
europium.canoni 193.79.237.14 2 u 4 64 1 262.597 -2.083 0.002
応答がありました。
回答ありがとうございました。
オフライン