[YLUG] Odd Ubuntu 8.04.2 ntpd issue
Anthony Edwards
anthony at yoyo.org
Tue Jul 14 09:52:00 UTC 2009
On Tue, Jul 14, 2009 at 10:30:16AM +0100, Gavin Atkinson wrote:
> On Tue, 2009-07-14 at 10:20 +0100, Anthony Edwards wrote:
> > I wonder if I can call on the collective wisdom of the group for
> > assistance with an odd ntpd issue.
> >
> > Yesterday I noticed that my system clock was way out of synch with that
> > of a remote server that I regularly ssh into, further investigation
> > revealed that my own system clock was running about 1 minute fast.
> >
> > Since then, further troubleshooting has revealed an oddity with ntpd and
> > Ubuntu 8.04.2.
> >
> > After booting, ntpd starts as shown by the output of ps -ef:
> >
> > anthony at riverside:~$ ps -ef | grep ntp
> > ntp 4250 1 0 09:44 ? 00:00:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -u 116:126 -g
> >
> > However, ntpd does not actually begin listening on any interfaces nor
> > synching with ny remote ntp servers, as shown by the output of cat
> > /var/log/syslog | grep ntp.
>
> Can you show the output of this command please?
There isn't any, at least not until after ntpd has been manually
restarted (that's the point).
> > Additionally, checking using ntpq confirms this:
> >
> > anthony at riverside:~$ ntpq
> > ntpq> pe
> > No association ID's returned
>
> OK, can you show your ntp.conf? If you are using hostnames and not IP
> addresses in the config file, it possible that on bootup ntpd is being
> started before the networking itself is working, or before DNS
> resolution is working?
>
> Try replacing one or more hostnames with IP addresses and see if that
> changes things at all.
My current /etc/ntp.conf is the Ubuntu 8.04.2 default, with three
additional ntp servers added:
anthony at riverside:~$ cat /etc/ntp.conf
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
driftfile /var/lib/ntp/ntp.drift
# Enable this if you want statistics to be logged.
statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
# You do need to talk to an NTP server or two (or three).
server ntp.ubuntu.com
# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
# details. The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions>
# might also be helpful.
#
# Note that "restrict" applies to both servers and clients, so a configuration
# that might be intended to block requests from certain clients could also end
# up blocking replies from your own upstream servers.
# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1
# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict 192.168.123.0 mask 255.255.255.0 notrust
# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)
#broadcast 192.168.123.255
# If you want to listen to time broadcasts on your local subnet, de-comment the
# next lines. Please do this only if you trust everybody on the network!
#disable auth
#broadcastclient
server ntp2.ja.net
server ntp.cs.strath.ac.uk
server ntp2a.mcc.ac.uk
--
Anthony Edwards
anthony at yoyo.org
More information about the York
mailing list