PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Ansteigende Zeit-Abweichung trotz NTP



Tentacle
16.07.07, 11:19
Hallo.

Ich habe ein mittelschweres Uhrzeitproblem, dem ich in den letzten Tagen nicht Herr werden konnte.

Ich habe zwei Suse-Server im Netz, die bisher einwandfrei liefen. Ich setze NTP ein und hatte zeitmäßig nie eine nennenswerte Abweichung. Nun habe ich letzte Woche einen der beiden Server mit SUSE 10.2 neu aufgesetzt und seitdem scheint seine Uhr langsamer zu laufen.

Ich hatte erst die ntp.conf vom anderen Server rüberkopiert, doch das brachte keine Besserung. Inzwischen habe ich zig Änderungen vorgenommen, die alle keine Besserung bringen. Dazu zählen das Hinzufügen weiterer Zeitserver und von RESTRICT-Zeilen (s.u.), die beim anderen Server aber nie nötig waren.

Hier meine ntp.conf:

server 127.127.1.0 # local clock (LCL)
fudge 127.127.1.0 stratum 10 # LCL is unsynchronized

server ptbtime1.ptb.de
server ptbtime2.ptb.de
server ntps1-0.cs.tu-berlin.de
server clock.isc.org

logfile /var/log/ntp/ntpd
driftfile /var/log/ntp/driftfile
statsdir /var/log/ntp/stats/

restrict 127.0.0.1
restrict ptbtime1.ptb.de
restrict ptbtime2.ptb.de
restrict ntps1-0.cs.tu-berlin.de
restrict clock.isc.org
restrict 127.127.1.0
restrict 192.168.0.0 mask 255.255.255.0 nomodify
restrict default kod notrap nomodify nopeer noquery

Um Euch das Ausmaß der Abweichung deutlich zu machen hier eine Grafik:
http://www.findyourfriends.de/uhrzeit.png

Jetzt werdet ihr vermutlich sagen, dass der NTP-Dienst keinen Connect bekommt. Aber dem ist nicht so. Wenn ich "rcntp stop" und "rcntp start" eingebe, holt er sich die aktuelle Uhrzeit und setzt sie (daher die Korrekturen in der Grafik).

Ein ntpq -p sieht übrigens so aus:

remote refid st t when poll reach delay offset jitter
================================================== ============================
*LOCAL(0) .LOCL. 10 l 16 64 377 0.000 0.000 0.008
ptbtime1.ptb.de .PTB. 1 u 363 1024 377 20.297 12205.1 4285.92
ptbtime2.ptb.de .PTB. 1 u 358 1024 377 21.066 12205.3 4277.49
ntps1-0.cs.tu-b .PPS. 1 u 355 1024 377 19.855 8179.62 2228.10
clock.isc.org .GPS. 1 u 356 1024 377 173.613 8281.29 2197.66

Und direkt nach einem Restart des Dienstes:

remote refid st t when poll reach delay offset jitter
================================================== ============================
LOCAL(0) .LOCL. 10 l 4 64 1 0.000 0.000 0.008
ptbtime1.ptb.de .PTB. 1 u 3 64 1 20.943 -0.756 0.008
ptbtime2.ptb.de .PTB. 1 u 3 64 1 20.305 -0.531 0.008
ntps1-0.cs.tu-b .PPS. 1 u 2 64 1 20.165 -0.961 0.008
clock.isc.org .GPS. 1 u 2 64 1 174.745 -3.744 0.008

Und eine Minute später:

remote refid st t when poll reach delay offset jitter
================================================== ============================
LOCAL(0) .LOCL. 10 l 7 64 7 0.000 0.000 0.008
ptbtime1.ptb.de .PTB. 1 u 8 64 7 20.943 -0.756 237.103
ptbtime2.ptb.de .PTB. 1 u 7 64 7 20.305 -0.531 236.829
ntps1-0.cs.tu-b .PPS. 1 u 8 64 7 20.165 -0.961 235.505
clock.isc.org .GPS. 1 u 3 64 7 174.614 238.720 171.451

Und 10 Minuten später:

remote refid st t when poll reach delay offset jitter
================================================== ============================
LOCAL(0) .LOCL. 10 l 18 64 77 0.000 0.000 0.008
*ptbtime1.ptb.de .PTB. 1 u 17 64 77 20.476 780.741 503.053
+ptbtime2.ptb.de .PTB. 1 u 17 64 77 20.305 -0.531 550.799
ntps1-0.cs.tu-b .PPS. 1 u 148 64 74 20.165 -0.961 367.824
+clock.isc.org .GPS. 1 u 20 64 77 174.621 702.232 437.410

Das Sternchen scheint er völlig wahlfrei mal hier mal da zu setzen. Ich bin echt ratlos und hoffe, ihr könnt mir helfen...

Gruß, Tentacle.

marce
16.07.07, 11:38
zuerst würde ich mal schauen, ob im Logfile was drin steht, das evtl. Auskunft geben könnte.

Evtl. reicht es auch, das driftfile zu löschen...

Tentacle
16.07.07, 12:35
/var/log/ntp


16 Jul 11:57:11 ntpd[24875]: synchronized to 192.53.103.108, stratum 1
16 Jul 11:57:11 ntpd[24875]: kernel time sync disabled 0001
16 Jul 12:01:35 ntpd[24875]: synchronized to 130.149.17.21, stratum 1
16 Jul 12:02:32 ntpd[24875]: synchronized to 213.239.216.86, stratum 2
16 Jul 12:03:37 ntpd[24875]: synchronized to LOCAL(0), stratum 10
16 Jul 12:04:47 ntpd[24875]: synchronized to 213.239.216.86, stratum 2
16 Jul 12:09:02 ntpd[24875]: synchronized to 192.53.103.108, stratum 1
16 Jul 12:11:08 ntpd[24875]: synchronized to LOCAL(0), stratum 10
16 Jul 12:11:10 ntpd[24875]: synchronized to 213.239.216.86, stratum 2
16 Jul 12:16:35 ntpd[24875]: synchronized to 192.53.103.108, stratum 1
16 Jul 12:21:57 ntpd[24875]: synchronized to LOCAL(0), stratum 10


/var/log/messages (nach Neustart von rcntp):

Jul 16 12:31:50 SuSE-102-32-minimal ntpdate[26506]: adjust time server 192.53.103.108 offset 0.278123 sec
Jul 16 12:31:50 SuSE-102-32-minimal ntpd[26512]: ntpd 4.2.2p4@1.1585-o Sat Nov 25 18:44:34 UTC 2006 (1)
Jul 16 12:31:50 SuSE-102-32-minimal ntpd[26513]: precision = 6.000 usec
Jul 16 12:31:50 SuSE-102-32-minimal ntpd[26513]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16
Jul 16 12:31:50 SuSE-102-32-minimal ntpd[26513]: Listening on interface wildcard, 0.0.0.0#123 Disabled
Jul 16 12:31:50 SuSE-102-32-minimal ntpd[26513]: Listening on interface wildcard, ::#123 Disabled
Jul 16 12:31:50 SuSE-102-32-minimal ntpd[26513]: Listening on interface lo, ::1#123 Enabled
Jul 16 12:31:50 SuSE-102-32-minimal ntpd[26513]: Listening on interface eth0, fe80::202:b3ff:fe26:6bd4#123 Enabled
Jul 16 12:31:50 SuSE-102-32-minimal ntpd[26513]: Listening on interface lo, 127.0.0.1#123 Enabled
Jul 16 12:31:50 SuSE-102-32-minimal ntpd[26513]: Listening on interface eth0, 88.198.48.175#123 Enabled
Jul 16 12:31:50 SuSE-102-32-minimal ntpd[26513]: kernel time sync status 0040

Driftfile habe ich gerade mal gelöscht... Vielleicht bringt das ja was...