- PR -

ntpサーバのポートが開かない

1
投稿者投稿内容
oct888
会議室デビュー日: 2005/10/17
投稿数: 2
投稿日時: 2005-10-17 00:10
お世話になります。

Redhat7.1Jのntp-4.0.99k-15にてntpサーバを構築しようとしています。
このサーバは外部に接続せずローカルで自身の時間を提供するものです。
しかしながらntpサーバを起動するとプロセスは動作しますがポートが開きません。

ntpdate -q localhostを実行すると
server 127.0.0.1, stratum 0, offset 0.000000, delay 0.00000
14 Oct 19:41:47 ntpdate[1173]: no server suitable for synchronization found
ntpdate -b localhostを実行すると
14 Oct 19:42:03 ntpdate[1174]: the NTP socket is in use, exiting
となります。

ntp.confに特段の設定は加えていません。(以下の通り)
#
# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available. The
# default stratum is usually 3, but in this case we elect to use stratum
# 0. Since the server line does not have the prefer keyword, this driver
# is never used for synchronization, unless no other other
# synchronization source is available. In case the local host is
# controlled by some external source, such as an external oscillator or
# another protocol, the prefer keyword would cause the local host to
# disregard all other synchronization sources, unless the kernel
# modifications are in use and declare an unsynchronized condition.
#
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 /etc/ntp/drift
multicastclient # listen on default 224.0.1.1
broadcastdelay 0.008

#
# Authentication delay. If you use, or plan to use someday, the
# authentication facility you should make the programs in the auth_stuff
# directory and figure out what this number should be on your machine.
#
authenticate no

#
# Keys file. If you want to diddle your server at run time, make a
# keys file (mode 600 for sure) and define the key number to be
# used for making requests.
#
# PLEASE DO NOT USE THE DEFAULT VALUES HERE. Pick your own, or remote
# systems might be able to reset your clock at will. Note also that
# ntpd is started with a -A flag, disabling authentication, that
# will have to be removed as well.
#
#keys /etc/ntp/keys

お気づきの点があればアドバイスを頂きたく。
よろしくお願い致します。
Dr.Doraemon
ぬし
会議室デビュー日: 2002/03/23
投稿数: 265
投稿日時: 2005-10-17 00:50
お疲れ様です。

ntpのポートがオープンできないとのことですが、まずは/var/log/messageを見てみてください。何らかのエラーをntpdが吐いている恐れがあります。

うまくいかないときは、まずログチェックですね。
kaz
ぬし
会議室デビュー日: 2003/11/06
投稿数: 5403
投稿日時: 2005-10-17 07:33
おはようございます.

localhost(127.0.0.1)からの接続を受け付けるように設定されていないのでは?
それと,ntpd が起動したまま ntpdate すると
利用 port が重複して通信できなかったと思います.
"the NTP socket is in use, exiting" がそれを表しているかと.

netstat で ntpd が 123/tcp(udp でしたっけ?)が
listen されていることを確認しましょう.

以上,ご参考までに.
oct888
会議室デビュー日: 2005/10/17
投稿数: 2
投稿日時: 2005-10-17 22:19
Dr.Doraemon様、kaz様
ご返答ありがとうございました。

ポートが開かない、という点についてはnmapで開放の有無を確認しており
UDPである事を見逃しておりました。

messageログにエラーが出力されており、同様の事象からntp.confの下記部を
コメントアウトにする事で正しく動作する事が確認できました。
multicastclient # listen on default 224.0.1.1
broadcastdelay 0.008

以上、改めましてありがとうございました。
1

スキルアップ/キャリアアップ(JOB@IT)