[YLUG] Odd Ubuntu 8.04.2 ntpd issue
Anthony Edwards
anthony at yoyo.org
Tue Jul 14 09:20:15 UTC 2009
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.
Additionally, checking using ntpq confirms this:
anthony at riverside:~$ ntpq
ntpq> pe
No association ID's returned
However, manually stopping and restarting the ntpd daemon resolves this:
anthony at riverside:~$ sudo /etc/init.d/ntp restart
[sudo] password for anthony:
* Stopping NTP server ntpd [ OK ]
* Starting NTP server ntpd
anthony at riverside:~$ tail -n 2000 /var/log/syslog | grep ntp
Jul 14 09:51:03 riverside ntpd[4250]: ntpd exiting on signal 15
Jul 14 09:51:05 riverside ntpd[7048]: ntpd 4.2.4p4 at 1.1520-o Wed May 13 21:05:57 UTC 2009 (1)
Jul 14 09:51:05 riverside ntpd[7049]: precision = 1.000 usec
Jul 14 09:51:05 riverside ntpd[7049]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled
Jul 14 09:51:05 riverside ntpd[7049]: Listening on interface #1 wildcard, ::#123 Disabled
Jul 14 09:51:05 riverside ntpd[7049]: Listening on interface #2 eth0, fe80::21c:c0ff:fe39:1ead#123 Enabled
Jul 14 09:51:05 riverside ntpd[7049]: Listening on interface #3 lo, ::1#123 Enabled
Jul 14 09:51:05 riverside ntpd[7049]: Listening on interface #4 lo, 127.0.0.1#123 Enabled
Jul 14 09:51:05 riverside ntpd[7049]: Listening on interface #5 eth0, 192.168.0.34#123 Enabled
Jul 14 09:51:05 riverside ntpd[7049]: kernel time sync status 0040
Jul 14 09:51:05 riverside ntpd[7049]: frequency initialized -28.644 PPM from /var/lib/ntp/ntp.drift
ntpq> pe
remote refid st t when poll reach delay offset jitter
==============================================================================
europium.canoni 193.79.237.14 2 u 10 64 1 35.852 48.179 0.001
ntp2.ja.net .MSF. 1 u 9 64 1 40.573 47.944 0.001
ntp0.cis.strath 193.62.22.98 2 u 8 64 1 44.516 47.905 0.001
maverick.mcc.ac 193.62.22.98 2 u 8 64 1 40.951 49.773 0.001
So, it appears that something is broken somewhere requiring ntpd to
be manually restarted each time after Ubuntu 8.04.2 has booted in
order to properly function.
I have written a shell script to do this:
anthony at riverside:~$ cat bin/ntpdstart
#!/bin/bash
sudo /etc/init.d/ntp restart
However, this shouldn't really be necessary, should it?
--
Anthony Edwards
anthony at yoyo.org
More information about the York
mailing list