2007年1月5日(金) 車の中がジメジメしてきました。晴れないかな [同日]
● SuSE9.0でntpdを使う。解決編。
昨日から気になっていたntpクライアントの問題がやっと片づきました。
まずは現在の状態。ntpqを使えばNTPサーバとの同期の状態が見られたんですよね。
# cat /etc/ntp.conf
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
server pool.ntp.org
server 127.127.1.0
fudge 127.127.1.0 stratum 10
driftfile /var/lib/ntp/drift/ntp.drift
logfile /var/log/ntp
# /etc/init.d/xntpd restart
Shutting network time protocol daemon (NTPD) done
Try to get initial date and time via NTP from pool.ntp.org done
Starting network time protocol daemon (NTPD) done
# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
LOCAL(0) LOCAL(0) 10 l 5 64 1 0.000 0.000 0.008
193.127.101.30 0.0.0.0 16 u - 64 0 0.000 0.000 4000.00
worf.rob-smith. 0.0.0.0 16 u - 64 0 0.000 0.000 4000.00
rabbit.de.20six 0.0.0.0 16 u - 64 0 0.000 0.000 4000.00
mirror.packetsc 0.0.0.0 16 u - 64 0 0.000 0.000 4000.00
reachが0になっているので同期できていないことがわかります。
Firewallを切ってxntpdをrestartしてみると、
# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
LOCAL(0) LOCAL(0) 10 l 2 64 1 0.000 0.000 0.008
84-16-235-165.i 0.0.0.0 16 u - 64 0 0.000 0.000 4000.00
81-178-50-155.d tock.usno.navy. 2 u 2 64 1 359.285 -112.70 0.008
jeo.wendtwerks. 0.0.0.0 16 u - 64 0 0.000 0.000 4000.00
20six.de 0.0.0.0 16 u - 64 0 0.000 0.000 4000.00
つながった。Firewallが悪いのか。 Additional Servicesに、123/tcp 123/udpを追加…ダメ。
結局、/etc/sysconfig/SuSEfirewall2 に下記を追記したらntpサーバーを読めるようになりました。
$ grep ^FW_SERVICES_EXT_..P /etc/sysconfig/SuSEfirewall2 FW_SERVICES_EXT_TCP="<中略> ntp" FW_SERVICES_EXT_UDP="ntp"
$ /usr/sbin/ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
LOCAL(0) LOCAL(0) 10 l 44 64 37 0.000 0.000 0.008
+skipjack.no-suc gatekeeper.no-s 2 u 45 64 37 206.295 46.654 13.976
+cmr-208-97-105- ecmail2.cmc.ec. 3 u 40 64 37 295.477 38.943 24.010
*84.45.68.23 ntp1.nl.uu.net 2 u 52 64 37 338.839 44.846 13.524
mirror.packetsc india.colorado. 2 u 48 64 37 230.156 35.452 14.438
再起動しちゃうあたりがなさけないね。
● 寝る前に、ずーっとgccを作っててくれたはずのオモコンマシンの電源を切ろうと思ったらpingが届かなくなっていた。嫌だなあ…。
[ツッコミを入れる]
脳味噌から汁が出るくらい考える。こともある。
最近のツッコまれどころ