xntp Zeitsynchonisation funktioniert nicht

Apache, Lighttpd, nginx, Cherokee
Post Reply
musicman75
Posts: 14
Joined: 2003-07-19 17:16
Location: Auenwald (Rems-Murr-Kreis)
 

xntp Zeitsynchonisation funktioniert nicht

Post by musicman75 »

Hallo,

ich habe bei 1und1 einen Rootserver und will jetzt über xntp die Zeit synchonisieren lassen, da die interne Uhr viel zu schnell läuft.

Habe in der ntp.conf die timeserver eingetragen und den damon gestartet. leider verbindet er sich nicht mit den timeservern.

Hat jemand ne Ahnung, waoran das liegen könnte?

System:
Suse 9.1
chris76
Posts: 1878
Joined: 2003-06-27 14:37
Location: Germering
 

Re: xntp Zeitsynchonisation funktioniert nicht

Post by chris76 »

logs?
Gruß Christian

BofH excuses: YOU HAVE AN I/O ERROR -> Incompetent Operator error
musicman75
Posts: 14
Joined: 2003-07-19 17:16
Location: Auenwald (Rems-Murr-Kreis)
 

Re: xntp Zeitsynchonisation funktioniert nicht

Post by musicman75 »

Hier die Logeinträge:

24 Apr 02:46:17 ntpd[1250]: ntpd exiting on signal 15
24 Apr 02:47:21 ntpd[5930]: ntpd exiting on signal 15
24 Apr 02:47:22 ntpd[5973]: ntpd exiting on signal 15
24 Apr 02:50:38 ntpd[6004]: synchronized to LOCAL(0), stratum 10
24 Apr 02:50:38 ntpd[6004]: kernel time sync disabled 0041
24 Apr 02:51:42 ntpd[6004]: kernel time sync enabled 0001
24 Apr 03:13:41 ntpd[6004]: ntpd exiting on signal 15
24 Apr 03:13:28 ntpd[6276]: ntpd exiting on signal 15
24 Apr 03:16:50 ntpd[6310]: synchronized to LOCAL(0), stratum 10
24 Apr 03:16:50 ntpd[6310]: kernel time sync disabled 0041
24 Apr 03:17:53 ntpd[6310]: kernel time sync enabled 0001
25 Apr 00:16:50 ntpd[6310]: ntpd exiting on signal 15
25 Apr 00:16:25 ntpd[21085]: ntpd exiting on signal 15
25 Apr 00:19:43 ntpd[21115]: synchronized to LOCAL(0), stratum 10
25 Apr 00:19:43 ntpd[21115]: kernel time sync disabled 0041
25 Apr 00:20:46 ntpd[21115]: kernel time sync enabled 0001
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: xntp Zeitsynchonisation funktioniert nicht

Post by Joe User »

Versuche es mal manuell:

Code: Select all

ntpdate -b -s -p 4 -t 0.1 ptbtime1.ptb.de
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
musicman75
Posts: 14
Joined: 2003-07-19 17:16
Location: Auenwald (Rems-Murr-Kreis)
 

Re: xntp Zeitsynchonisation funktioniert nicht

Post by musicman75 »

muss da irgendeine Ausgabe erfolgen?

wenn ich das eingebe kommt direkt wieder die eingabezeile, ohne ausgabe.

Bei Eingabe des Befehles: /usr/sbin/ntpq -c peers kommt folgendes:

remote refid st t when poll reach delay offset jitter
==============================================================================
*LOCAL(0) LOCAL(0) 10 l 285 1024 377 0.000 0.000 0.001
ntp1.ptb.de .INIT. 16 u - 1024 0 0.000 0.000 4000.00
ntp2.ptb.de .INIT. 16 u - 1024 0 0.000 0.000 4000.00


müsste da vor den servern nicht ein "+" stehen?
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: xntp Zeitsynchonisation funktioniert nicht

Post by Joe User »

Musicman75 wrote:muss da irgendeine Ausgabe erfolgen?
Nein, aber Du kannst davor und danach die Ausgabe von date vergleichen.
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
ag
Posts: 89
Joined: 2004-07-25 00:17
 

Re: xntp Zeitsynchonisation funktioniert nicht

Post by ag »

Hey

Code: Select all

/usr/sbin/ntpdate -u ntp1.ptb.de >> /var/log/messages 2>&1 && /sbin/hwclock -uw
per cronjob z.B.
und dann log er sogar mit und stellt die HW-Uhr

By AG
musicman75
Posts: 14
Joined: 2003-07-19 17:16
Location: Auenwald (Rems-Murr-Kreis)
 

Re: xntp Zeitsynchonisation funktioniert nicht

Post by musicman75 »

die uhr stellen tut er so, ich wollte aber eigentlich diese funktion auch nutzen, um die abweichung zu protokollieren und so die uhr irgendwann genau am laufen zu haben.
ag
Posts: 89
Joined: 2004-07-25 00:17
 

Re: xntp Zeitsynchonisation funktioniert nicht

Post by ag »

Hey

Ixch glaube die abweichung schreib er mit ins log. Aber die ist ja Verbindungsabhängig ---> also nicht direkt verwendbar

By AG
musicman75
Posts: 14
Joined: 2003-07-19 17:16
Location: Auenwald (Rems-Murr-Kreis)
 

Re: xntp Zeitsynchonisation funktioniert nicht

Post by musicman75 »

verbindungsabhängig?

mein server hat ne ständige netzverbindung
ag
Posts: 89
Joined: 2004-07-25 00:17
 

Re: xntp Zeitsynchonisation funktioniert nicht

Post by ag »

Hey

Hier mal etwas Lektüre

http://www.linum.com/de/presse/linuxmagazin.htm
http://www.selflinux.org/selflinux/html/ntp.html

Mit Verbindungsabhänig meinte ich den Zeitunterschied der entsteht zwischen Anfrage und Antwort (Millisekunden) je nachdem wie u.a. auch der Zeitserver ausgelastet ist.

Wenn du eine ständige Verbindung hast dann las doch einen cron die Synchronisation tun

By AG
musicman75
Posts: 14
Joined: 2003-07-19 17:16
Location: Auenwald (Rems-Murr-Kreis)
 

Re: xntp Zeitsynchonisation funktioniert nicht

Post by musicman75 »

habe ich gestern auch als cron eingerichtet. hatte vorher netdate als cron laufen und habe bei jedem ausführe ne mail bekommen. das war ziemlich nerfig. jetzt scheint es aber zu funktionieren.

herzlichen dank für die hilfe.
[tom]
Posts: 656
Joined: 2003-01-08 20:10
Location: Berlin
 

Re: xntp Zeitsynchonisation funktioniert nicht

Post by [tom] »

Musicman75 wrote: 24 Apr 02:50:38 ntpd[6004]: synchronized to LOCAL(0), stratum 10
Du hast noch den Dummy local Eintrag in Deiner /etc/ntp.conf. Poste mal den Inhalt von /etc/ntp.conf hier.


Im Prinzip reicht folgendes:

Code: Select all

server ntp1.ptb.de
server ntp2.ptb.de
driftfile /var/lib/ntp/drift/ntp.drift
logfile /var/log/ntp

[TOM]
musicman75
Posts: 14
Joined: 2003-07-19 17:16
Location: Auenwald (Rems-Murr-Kreis)
 

Re: xntp Zeitsynchonisation funktioniert nicht

Post by musicman75 »

Hier meine ntp.conf

Code: Select all

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

##
## Outside source of synchronized time
##
## server xx.xx.xx.xx		# IP address of server

##
## Miscellaneous stuff
##

driftfile /var/lib/ntp/drift/ntp.drift # path for drift file

logfile   /var/log/ntp		# alternate log file
# logconfig =syncstatus + sysevents
# logconfig =all

# statsdir /tmp/		# directory for statistics files
# filegen peerstats  file peerstats  type day enable
# filegen loopstats  file loopstats  type day enable
# filegen clockstats file clockstats type day enable

#
# Authentication stuff
#
# keys /etc/ntp.keys		# path for keys file
# trustedkey 1 2 3 4 5 6 14 15	# define trusted keys
# requestkey 15			# key (7) for accessing server variables
# controlkey 15			# key (6) for accessing server variables

server ntp1.ptb.de
server ntp2.ptb.de 


restrict default ignore notrust nomodify notrap
restrict 127.0.0.1
restrict 217.160.191.195
restrict 212.227.123.64 mask 255.255.255.255 nomodify notrap noquery
restrict 195.20.224.142 mask 255.255.255.255 nomodify notrap noquery
Post Reply