[ntp:questions] ntp not updating the time
Marc Fromm
Marc.Fromm at wwu.edu
Tue Apr 13 23:13:09 UTC 2010
I am using RedHat 5.2 and running ntp-4.2.2p1-9.el5_4.1.
The server loses 1 second per minute.
I've been checking it since I manually updated the time and after 2 hours it is 2 minutes and 1 second behind.
ntpq -p produces the following:
remote refid st t when poll reach delay offset jitter
==============================================================================
131.107.13.100 .ACTS. 1 u 858 1024 374 4.431 62588.8 21305.0
*LOCAL(0) .LOCL. 10 l 16 64 377 0.000 0.000 0.001
My ntp.conf file is all defaults except for the time server entry on line 13.
1 # Permit time synchronization with our time source, but do not
2 # permit the source to query or modify the service on this system.
3 restrict default kod nomodify notrap nopeer noquery
4 restrict -6 default kod nomodify notrap nopeer noquery
5
6 # Permit all access over the loopback interface. This could
7 # be tightened as well, but to do so would effect some of
8 # the administrative functions.
9 restrict 127.0.0.1
10 restrict -6 ::1
11
12 # --- OUR TIMESERVERS -----
13 server time-nw.nist.gov iburst
14
15 # Hosts on local network are less restricted.
16 #restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
17
18 # Use public servers from the pool.ntp.org project.
19 # Please consider joining the pool (http://www.pool.ntp.org/join.html).
20 #server 0.rhel.pool.ntp.org
21 #server 1.rhel.pool.ntp.org
22 #server 2.rhel.pool.ntp.org
23
24 #broadcast 192.168.1.255 key 42 # broadcast server
25 #broadcastclient # broadcast client
26 #broadcast 224.0.1.1 key 42 # multicast server
27 #multicastclient 224.0.1.1 # multicast client
28 #manycastserver 239.255.254.254 # manycast server
29 #manycastclient 239.255.254.254 key 42 # manycast client
30
31 # Undisciplined Local Clock. This is a fake driver intended for backup
32 # and when no outside source of synchronized time is available.
33 server 127.127.1.0 # local clock
34 fudge 127.127.1.0 stratum 10
35
36 # Drift file. Put this in a directory which the daemon can write to.
37 # No symbolic links allowed, either, since the daemon updates the file
38 # by creating a temporary in the same directory and then rename()'ing
39 # it to the file.
40 driftfile /var/lib/ntp/drift
41
42 # Key file containing the keys and key identifiers used when operating
43 # with symmetric key cryptography.
44 keys /etc/ntp/keys
45
46 # Specify the key identifiers which are trusted.
47 #trustedkey 4 8 42
48
49 # Specify the key identifier to use with the ntpdc utility.
50 #requestkey 8
51
52 # Specify the key identifier to use with the ntpq utility.
53 #controlkey 8
-----Original Message-----
From: questions-bounces+marc.fromm=wwu.edu at lists.ntp.org [mailto:questions-bounces+marc.fromm=wwu.edu at lists.ntp.org] On Behalf Of David Woolley
Sent: Tuesday, April 13, 2010 3:02 PM
To: questions at lists.ntp.org
Subject: Re: ntp not updating the time
Marc Fromm wrote:
> If I restart the ntpd service the time is updated to the correct time:
> /sbin/service ntpd restart
I.E. /etc/init.d/ntpd restart
which, although a deprecated procedure, will probably run ntpdate.
>
> If I run the command below the time is updated to the correct time:
> ntpdate -u time-nw.nist.gov
>
> If I don't do any of the above my time is never updated and the server becomes hours behind.
>
> How or when does ntpd automatically update the time?
When the measured error is between 128ms and 1,000 seconds and has
persisted for about 15 minutes. If it is less, ntpd tweaks the
effective clock frequency every second, or asks the kernel to do so
every tick, so as to slowly (order of hours) converge the clock onto the
correct time. If it is greater, ntpd aborts, as its idea of the time is
unsafe.
Note, selective failures of ntpd relative to some options of ntpdate can
be due to firewalling of UDP port 123.
The standard ntpq diagnostics (peers, rv 0, assoc, rv for every
association id) and the syslog entries would be helpful, together with
any local changes to the configuration file. You should leave the sytem
running for at least 30 minutes before running ntpq (less is possible,
but 30 minutes should cover all likely settings).
As service is part of RedHat, not ntpd, and /etc/init.d/ntpd will also
be part of RedHat, I assume you are using some version of RedHat, but
you really should have told us which, and which version of ntpd.
_______________________________________________
questions mailing list
questions at lists.ntp.org
http://lists.ntp.org/listinfo/questions
More information about the questions
mailing list