JP Vossen on 22 Mar 2008 12:41:01 -0700 |
I have a local NTP server synced to [0123].us.pool.ntp.org. I keep an eye on it via a trivial cron job [1]. The other day I had to edit /etc/ntp.conf and add a 'restrict' line for a LAN segment I'd forgotten about. Naturally I restarted ntpd. For some reason, it seems like the Debian Etch '/etc/init.d/ntp restart' didn't actually stop ntpd, but did try to start it again. Based on ntptrace and log output [2], I suspected pool.ntp.org oddness, but there was nothing about it in the ML archives (http://www.pool.ntp.org/mailinglists.html). After various attempted pool and ntp.conf "debugging" and (failed) restarts I ended up with 3-4 ntpd processes stepping all over each other. The result was additional confusing NTP behavior and logs on my LAN. I finally thought to check the processes using 'pgrep -l ntp' and found all the dups. I 'kill'ed them, started ntpd, checked there was only one, and after the usual delay for NTP to get happy everything seems like it's back to normal. I suspect this isn't a bug in the Debian Etch /etc/init.d/ntp script but rather an odd interaction with Monit or something else on my local system. But just in case... FYI, JP [1] Trivial NTP health; alert if localhost stratum > 2: 25 * * * * ntptrace | head -n1 | perl -ne 'm/^[\w.]+: stratum (\d+),/ or next; print qq(NTP not in sync: $_) if ( $1 > 2 );' [2] ntptrace & ntpd log oddness ntptrace bad ------------ # ntptrace localhost: stratum 3, offset 0.000776, synch distance 0.070912 64.25.87.54: timed out, nothing received ***Request timed out ntptrace better --------------- # ntptrace localhost: stratum 3, offset 0.005604, synch distance 0.492793 server1-a.your.org: stratum 2, offset 0.000011, synch distance 0.028427 ntp.your.org: stratum 1, offset 0.000002, synch distance 0.000442, refid 'CDMA' ntptrace best ------------- # ntptrace localhost: stratum 2, offset 0.000643, synch distance 0.034803 nist.netservicesgroup.com: stratum 1, offset 0.000000, synch distance 0.002650, refid 'ACTS' ntpd /var/log/daemon.log bad ---------------------------- Mar 22 14:39:41 drake ntpd[11281]: ntpd 4.2.2p4@1.1585-o Sun Mar 4 13:21:35 UTC 2007 (1) Mar 22 14:39:41 drake ntpd[11282]: precision = 1.000 usec Mar 22 14:39:41 drake ntpd[11282]: bind() fd 16, family 2, port 123, addr 0.0.0.0, in_classd=0 flags=9 fails: Address already in use Mar 22 14:39:41 drake ntpd[11282]: bind() fd 16, family 10, port 123, scope 0, addr ::, in6_is_addr_multicast=0 flags=1 fails: Address already in use Mar 22 14:39:41 drake ntpd[11282]: bind() fd 16, family 10, port 123, scope 0, addr ::1, in6_is_addr_multicast=0 flags=1 fails: Address already in use Mar 22 14:39:41 drake ntpd[11282]: bind() fd 16, family 10, port 123, scope 2, addr fe80::2c0:9fff:fe0b:8ff6, in6_is_addr_multicast=0 flags=1 fails: Address already in use Mar 22 14:39:41 drake ntpd[11282]: bind() fd 16, family 2, port 123, addr 127.0.0.1, in_classd=0 flags=5 fails: Address already in use Mar 22 14:39:41 drake ntpd[11282]: bind() fd 16, family 2, port 123, addr 192.168.99.11, in_classd=0 flags=25 fails: Address already in use Mar 22 14:39:41 drake ntpd[11282]: kernel time sync status 0040 Mar 22 14:39:41 drake ntpd[11282]: frequency initialized 169.923 PPM from /var/lib/ntp/ntp.drift Mar 22 14:39:42 drake ntpd[11282]: sendto(192.43.244.18) (fd=-1): Bad file descriptor Mar 22 14:39:43 drake ntpd[11282]: sendto(64.85.165.96) (fd=-1): Bad file descriptor Mar 22 14:39:44 drake ntpd[11282]: sendto(64.25.87.54) (fd=-1): Bad file descriptor Mar 22 14:39:45 drake ntpd[11282]: sendto(64.151.107.60) (fd=-1): Bad file descriptor ntpd /var/log/daemon.log good ----------------------------- Mar 21 13:28:57 drake ntpd[15903]: Listening on interface eth0, 192.168.99.11#123 Enabled Mar 21 13:28:57 drake ntpd[15903]: kernel time sync status 0040 Mar 21 13:28:57 drake ntpd[15903]: frequency initialized 169.682 PPM from /var/lib/ntp/ntp.drift Mar 21 13:32:11 drake ntpd[15903]: synchronized to 192.43.244.18, stratum 1 Mar 21 13:32:11 drake ntpd[15903]: kernel time sync enabled 0001 Mar 21 13:35:46 drake monit[4680]: 'ntpd' process PID changed to 15903 Mar 21 13:37:32 drake ntpd[15903]: synchronized to 128.10.252.7, stratum 1 Mar 21 14:04:22 drake ntpd[15903]: synchronized to 192.43.244.18, stratum 1 Mar 21 14:11:56 drake ntpd[15903]: synchronized to 128.10.252.7, stratum 1 Mar 21 14:36:31 drake ntpd[15903]: synchronized to 192.43.244.18, stratum 1 Mar 21 16:10:28 drake ntpd[15903]: synchronized to 128.10.252.7, stratum 1 ----------------------------|:::======|------------------------------- JP Vossen, CISSP |:::======| jp{at}jpsdomain{dot}org My Account, My Opinions |=========| http://www.jpsdomain.org/ ----------------------------|=========|------------------------------- "Microsoft Tax" = the additional hardware & yearly fees for the add-on software required to protect Windows from its own poorly designed and implemented self, while the overhead incidentally flattens Moore's Law. ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|