Ubuntu NTPサーバー:同期に適したサーバーが見つかりません。

Ubuntu NTPサーバー:同期に適したサーバーが見つかりません。

私はNTPを使用して4つのRaspberry PiクロックをUbuntuサーバー(すべてローカルネットワーク上にあり、イーサネット経由で接続)と同期しています。すべてのデバイスはオフラインなので、サーバーはローカルクロックのみを受信します。リアルタイムは重要ではありません。ホストを再起動してNTPサーバーを起動すると、クライアントは数分間同期に失敗します。

sudo ntpdate NTP-server-host

エラー発生:

6月18日 18:42:55 ntpdate[1546]: 同期に適したサーバーが見つかりません。

NTPサーバーホストサーバーのIPに相当)数分で動作します。これは再起動後にのみ発生します。なぜですか?サーバーが稼働しており、ファイアウォールポートが開いています。

サーバーのntp.conf:

driftfile /var/lib/ntp/ntp.drift

# Leap seconds definition provided by tzdata
leapfile /usr/share/zoneinfo/leap-seconds.list

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

server 127.127.1.0
fudge 127.127.1.0 stratum 10

# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery limited
restrict -6 default kod notrap nomodify nopeer noquery limited

# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1

# Needed for adding pool entries
restrict source notrap nomodify noquery

クライアントのntp.conf:

driftfile /var/lib/ntp/ntp.drift

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


# pool.ntp.org maps to about 1000 low-stratum NTP servers.  Your server will
# pick a different set every time it starts up.  Please consider joining the
# pool: <http://www.pool.ntp.org/join.html>
pool 0.debian.pool.ntp.org iburst
pool 1.debian.pool.ntp.org iburst
pool 2.debian.pool.ntp.org iburst
pool 3.debian.pool.ntp.org iburst

# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery limited
restrict -6 default kod notrap nomodify nopeer noquery limited

# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1

# Needed for adding pool entries
restrict source notrap nomodify noquery

# Use specified ntp server
server NTP-server-host prefer iburst

ntp.confファイルのみを修正しましたが、完全には理解できませんでした。より多くの知識を持つ人が私が間違っていることを教えてくれたらいいでしょう。ありがとうございます!

ベストアンサー1

これは完全に正常です。 NTPが安定してサービス時間を開始するには、複数のサイクルが必要です。クライアント部分も、サーバーが安定して時間を提供できることを確認するのに数サイクルかかります。

以下を実行すると、Ubuntuサーバーで何が起こっているかを確認できます。

ntpq -pn

また、上記のすべてのシステムがオフラインで実行されているため、クライアント構成からプールサーバーを削除することをお勧めします。

おすすめ記事