edwardp Posted June 28, 2008 Report Share Posted June 28, 2008 (edited) In https://mandrivausers.org/index.php?showtop...st&p=306346, ianw1974 suggested a workaround to have NTP start later in the process as by itself, it was not finding any servers at boot. This was because I thought NTP was starting too early in the process before the network came up/computer received IP address from the router. This workaround is no longer working as in the syslog, I am again seeing things like: Jun 28 05:46:32 mandrivatwo ntpdate[3417]: can't find host bonehed.lcs.mit.edu Jun 28 05:46:32 mandrivatwo ntpdate[3417]: no servers can be used, exiting Jun 28 05:46:33 mandrivatwo ntpdate[3475]: can't find host bonehed.lcs.mit.edu Jun 28 05:46:33 mandrivatwo ntpdate[3475]: no servers can be used, exiting Jun 28 05:46:35 mandrivatwo ntpdate[3530]: can't find host bonehed.lcs.mit.edu Jun 28 05:46:35 mandrivatwo ntpdate[3530]: no servers can be used, exiting Jun 28 05:46:36 mandrivatwo ntpdate[3587]: can't find host bonehed.lcs.mit.edu Jun 28 05:46:36 mandrivatwo ntpdate[3587]: no servers can be used, exiting Jun 28 05:46:37 mandrivatwo ntpdate[3665]: can't find host bonehed.lcs.mit.edu Jun 28 05:46:37 mandrivatwo ntpdate[3665]: no servers can be used, exiting Jun 28 05:46:38 mandrivatwo ntpdate[3746]: can't find host bonehed.lcs.mit.edu Jun 28 05:46:38 mandrivatwo ntpdate[3746]: no servers can be used, exiting Jun 28 09:46:41 mandrivatwo ntpdate[3776]: step time server 18.26.4.105 offset 14401.997043 sec Jun 28 09:46:42 mandrivatwo ntpd[3792]: ntpd 4.2.4p4@1.1520-o Fri Mar 14 06:59:25 UTC 2008 (1) Jun 28 09:46:42 mandrivatwo ntpd[3796]: precision = 9.000 usec Jun 28 09:46:42 mandrivatwo ntpd[3796]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16 Jun 28 09:46:42 mandrivatwo ntpd[3796]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled Jun 28 09:46:42 mandrivatwo ntpd[3796]: Listening on interface #1 wildcard, ::#123 Disabled Jun 28 09:46:42 mandrivatwo ntpd[3796]: Listening on interface #2 lo, ::1#123 Enabled Jun 28 09:46:42 mandrivatwo ntpd[3796]: Listening on interface #3 eth0, fe80::203:6dff:fe1b:fc7c#123 Enabled Jun 28 09:46:42 mandrivatwo ntpd[3796]: Listening on interface #4 lo, 127.0.0.1#123 Enabled Jun 28 09:46:42 mandrivatwo ntpd[3796]: Listening on interface #5 eth0, 192.168.1.6#123 Enabled Jun 28 09:46:42 mandrivatwo ntpd[3796]: kernel time sync status 0040 Jun 28 09:46:42 mandrivatwo ntpd[3796]: frequency initialized 36.693 PPM from /var/lib/ntp/drift Jun 28 09:47:13 mandrivatwo ntpdate[4494]: the NTP socket is in use, exiting Jun 28 09:47:14 mandrivatwo ntpdate[4496]: the NTP socket is in use, exiting Jun 28 09:47:15 mandrivatwo ntpdate[4502]: the NTP socket is in use, exiting Jun 28 09:47:16 mandrivatwo ntpdate[4504]: the NTP socket is in use, exiting Jun 28 09:47:18 mandrivatwo ntpdate[4506]: the NTP socket is in use, exiting Jun 28 09:47:19 mandrivatwo ntpdate[4508]: the NTP socket is in use, exiting Jun 28 09:47:20 mandrivatwo ntpdate[4514]: the NTP socket is in use, exiting Jun 28 09:49:58 mandrivatwo ntpd[3796]: synchronized to LOCAL(0), stratum 10 Jun 28 09:49:58 mandrivatwo ntpd[3796]: kernel time sync status change 0001 The four hour gap in the log above is directly related to the known drakxclock bug. I first reversed the workaround by chkconfig ntpd on and removed service ntpd start from /etc/rc.local, which had the same results, NTP couldn't find the host. One other suggestion was to issue a static IP to the computers. I attempted this with one, by disabling DHCP on the router so it would not assign an IP address, then reconfigured the computer to use a static IP. The result of this, is that the router would not let the static IP'd computer connect to it. I then re-enabled DHCP, the computer received the previously issued IP address (via DHCP) and rebooted the computer into runlevel 3. At runlevel 3, NTP appears to have successfully connected on the first attempt: Jun 28 13:37:10 mandrivatwo ntpdate[3468]: step time server 63.119.46.3 offset 14424.935899 sec Jun 28 13:37:10 mandrivatwo ntpd[3714]: ntpd 4.2.4p4@1.1520-o Fri Mar 14 06:59:25 UTC 2008 (1) Jun 28 13:37:10 mandrivatwo ntpd[3729]: precision = 10.000 usec Jun 28 13:37:10 mandrivatwo ntpd[3729]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16 Jun 28 13:37:10 mandrivatwo ntpd[3729]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled Jun 28 13:37:10 mandrivatwo ntpd[3729]: Listening on interface #1 wildcard, ::#123 Disabled Jun 28 13:37:10 mandrivatwo ntpd[3729]: Listening on interface #2 lo, ::1#123 Enabled Jun 28 13:37:10 mandrivatwo ntpd[3729]: Listening on interface #3 eth0, fe80::203:6dff:fe1b:fc7c#123 Enabled Jun 28 13:37:10 mandrivatwo ntpd[3729]: Listening on interface #4 lo, 127.0.0.1#123 Enabled Jun 28 13:37:10 mandrivatwo ntpd[3729]: Listening on interface #5 eth0, 192.168.1.6#123 Enabled Jun 28 13:37:10 mandrivatwo ntpd[3729]: kernel time sync status 0040 Jun 28 13:37:11 mandrivatwo ntpd[3729]: frequency initialized 50.021 PPM from /var/lib/ntp/drift Jun 28 13:40:26 mandrivatwo ntpd[3729]: synchronized to LOCAL(0), stratum 10 Jun 28 13:40:26 mandrivatwo ntpd[3729]: kernel time sync status change 0001 Jun 28 13:41:29 mandrivatwo ntpd[3729]: synchronized to 216.14.98.234, stratum 2 This is also occurring on my other desktop: Jun 28 12:29:44 mandriva ntpdate[3312]: can't find host 0.us.pool.ntp.org Jun 28 12:29:44 mandriva ntpdate[3312]: can't find host 1.us.pool.ntp.org Jun 28 12:29:44 mandriva ntpdate[3312]: can't find host 2.us.pool.ntp.org Jun 28 12:29:44 mandriva ntpdate[3312]: no servers can be used, exiting Jun 28 12:29:45 mandriva ntpdate[3348]: can't find host 0.us.pool.ntp.org Jun 28 12:29:45 mandriva ntpdate[3348]: can't find host 1.us.pool.ntp.org Jun 28 12:29:45 mandriva ntpdate[3348]: can't find host 2.us.pool.ntp.org Jun 28 12:29:45 mandriva ntpdate[3348]: no servers can be used, exiting Jun 28 12:29:47 mandriva ntpdate[3368]: can't find host 0.us.pool.ntp.org Jun 28 12:29:47 mandriva ntpdate[3368]: can't find host 1.us.pool.ntp.org Jun 28 12:29:47 mandriva ntpdate[3368]: can't find host 2.us.pool.ntp.org Jun 28 12:29:47 mandriva ntpdate[3368]: no servers can be used, exiting Jun 28 12:29:48 mandriva ntpdate[3408]: can't find host 0.us.pool.ntp.org Jun 28 12:29:48 mandriva ntpdate[3408]: can't find host 1.us.pool.ntp.org Jun 28 12:29:48 mandriva ntpdate[3408]: can't find host 2.us.pool.ntp.org Jun 28 12:29:48 mandriva ntpdate[3408]: no servers can be used, exiting Jun 28 12:29:50 mandriva ntpdate[3429]: can't find host 0.us.pool.ntp.org Jun 28 12:29:50 mandriva ntpdate[3429]: can't find host 1.us.pool.ntp.org Jun 28 12:29:50 mandriva ntpdate[3429]: can't find host 2.us.pool.ntp.org Jun 28 12:29:50 mandriva ntpdate[3429]: no servers can be used, exiting Jun 28 12:29:51 mandriva ntpdate[3457]: can't find host 0.us.pool.ntp.org Jun 28 12:29:51 mandriva ntpdate[3457]: can't find host 1.us.pool.ntp.org Jun 28 12:29:51 mandriva ntpdate[3457]: can't find host 2.us.pool.ntp.org Jun 28 12:29:52 mandriva ntpdate[3457]: no servers can be used, exiting Jun 28 12:29:53 mandriva ntpdate[3481]: can't find host 0.us.pool.ntp.org Jun 28 12:29:53 mandriva ntpdate[3481]: can't find host 1.us.pool.ntp.org Jun 28 12:29:53 mandriva ntpdate[3481]: can't find host 2.us.pool.ntp.org Jun 28 12:29:53 mandriva ntpdate[3481]: no servers can be used, exiting Jun 28 12:29:57 mandriva ntpd[3560]: ntpd 4.2.4p4@1.1520-o Fri Mar 14 06:59:25 UTC 2008 (1) Jun 28 12:29:57 mandriva ntpd[3579]: precision = 10.000 usec Jun 28 12:29:57 mandriva ntpd[3579]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16 Jun 28 12:29:57 mandriva ntpd[3579]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled Jun 28 12:29:57 mandriva ntpd[3579]: Listening on interface #1 wildcard, ::#123 Disabled Jun 28 12:29:57 mandriva ntpd[3579]: Listening on interface #2 lo, ::1#123 Enabled Jun 28 12:29:57 mandriva ntpd[3579]: Listening on interface #3 eth0, fe80::204:5aff:fe7c:27ec#123 Enabled Jun 28 12:29:57 mandriva ntpd[3579]: Listening on interface #4 lo, 127.0.0.1#123 Enabled Jun 28 12:29:57 mandriva ntpd[3579]: Listening on interface #5 eth0, 192.168.1.3#123 Enabled Jun 28 12:29:57 mandriva ntpd[3579]: kernel time sync status 0040 Jun 28 12:29:57 mandriva ntpd[3579]: frequency initialized 121.272 PPM from /var/lib/ntp/drift Jun 28 12:32:39 mandriva ntpdate[4605]: the NTP socket is in use, exiting Jun 28 12:32:41 mandriva ntpdate[4607]: the NTP socket is in use, exiting Jun 28 12:32:42 mandriva ntpdate[4610]: the NTP socket is in use, exiting Jun 28 12:32:43 mandriva ntpdate[4612]: the NTP socket is in use, exiting Jun 28 12:32:44 mandriva ntpdate[4614]: the NTP socket is in use, exiting Jun 28 12:32:46 mandriva ntpdate[4620]: the NTP socket is in use, exiting Jun 28 12:32:47 mandriva ntpdate[4638]: the NTP socket is in use, exiting Jun 28 12:33:12 mandriva ntpd[3579]: synchronized to LOCAL(0), stratum 10 Jun 28 12:33:12 mandriva ntpd[3579]: kernel time sync status change 0001 Jun 28 12:51:47 mandriva ntpd[3579]: ntpd exiting on signal 15 Jun 28 12:51:59 mandriva ntpd_initres[3603]: parent died before we finished, exiting Jun 28 12:56:23 mandriva ntpdate[3357]: can't find host 0.us.pool.ntp.org Jun 28 12:56:23 mandriva ntpdate[3357]: can't find host 1.us.pool.ntp.org Jun 28 12:56:23 mandriva ntpdate[3357]: can't find host 2.us.pool.ntp.org Jun 28 12:56:23 mandriva ntpdate[3357]: no servers can be used, exiting Jun 28 12:56:24 mandriva ntpdate[3402]: can't find host 0.us.pool.ntp.org Jun 28 12:56:24 mandriva ntpdate[3402]: can't find host 1.us.pool.ntp.org Jun 28 12:56:24 mandriva ntpdate[3402]: can't find host 2.us.pool.ntp.org Jun 28 12:56:24 mandriva ntpdate[3402]: no servers can be used, exiting Jun 28 12:56:25 mandriva ntpdate[3423]: can't find host 0.us.pool.ntp.org Jun 28 12:56:25 mandriva ntpdate[3423]: can't find host 1.us.pool.ntp.org Jun 28 12:56:26 mandriva ntpdate[3423]: can't find host 2.us.pool.ntp.org Jun 28 12:56:26 mandriva ntpdate[3423]: no servers can be used, exiting Jun 28 12:56:27 mandriva ntpdate[3456]: can't find host 0.us.pool.ntp.org Jun 28 12:56:27 mandriva ntpdate[3456]: can't find host 1.us.pool.ntp.org Jun 28 12:56:27 mandriva ntpdate[3456]: can't find host 2.us.pool.ntp.org Jun 28 12:56:27 mandriva ntpdate[3456]: no servers can be used, exiting Jun 28 12:56:28 mandriva ntpdate[3474]: can't find host 0.us.pool.ntp.org Jun 28 12:56:29 mandriva ntpdate[3474]: can't find host 1.us.pool.ntp.org Jun 28 12:56:29 mandriva ntpdate[3474]: can't find host 2.us.pool.ntp.org Jun 28 12:56:29 mandriva ntpdate[3474]: no servers can be used, exiting Jun 28 12:56:30 mandriva ntpdate[3501]: can't find host 0.us.pool.ntp.org Jun 28 12:56:30 mandriva ntpdate[3501]: can't find host 1.us.pool.ntp.org Jun 28 12:56:30 mandriva ntpdate[3501]: can't find host 2.us.pool.ntp.org Jun 28 12:56:30 mandriva ntpdate[3501]: no servers can be used, exiting Jun 28 12:56:32 mandriva ntpdate[3527]: can't find host 0.us.pool.ntp.org Jun 28 12:56:32 mandriva ntpdate[3527]: can't find host 1.us.pool.ntp.org Jun 28 12:56:32 mandriva ntpdate[3527]: can't find host 2.us.pool.ntp.org Jun 28 12:56:32 mandriva ntpdate[3527]: no servers can be used, exiting Jun 28 12:56:36 mandriva ntpd[3602]: ntpd 4.2.4p4@1.1520-o Fri Mar 14 06:59:25 UTC 2008 (1) Jun 28 12:56:36 mandriva ntpd[3626]: precision = 10.000 usec Jun 28 12:56:36 mandriva ntpd[3626]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16 Jun 28 12:56:36 mandriva ntpd[3626]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled Jun 28 12:56:36 mandriva ntpd[3626]: Listening on interface #1 wildcard, ::#123 Disabled Jun 28 12:56:36 mandriva ntpd[3626]: Listening on interface #2 lo, ::1#123 Enabled Jun 28 12:56:36 mandriva ntpd[3626]: Listening on interface #3 eth0, fe80::204:5aff:fe7c:27ec#123 Enabled Jun 28 12:56:36 mandriva ntpd[3626]: Listening on interface #4 lo, 127.0.0.1#123 Enabled Jun 28 12:56:36 mandriva ntpd[3626]: Listening on interface #5 eth0, 192.168.1.3#123 Enabled Jun 28 12:56:36 mandriva ntpd[3626]: kernel time sync status 0040 Jun 28 12:56:36 mandriva ntpd[3626]: frequency initialized 121.272 PPM from /var/lib/ntp/drift Jun 28 12:59:50 mandriva ntpd[3626]: synchronized to LOCAL(0), stratum 10 Jun 28 12:59:50 mandriva ntpd[3626]: kernel time sync status change 0001 I am tempted to report this as a bug, but given what has occurred so far, I cannot determine exactly what the bug might be, aside from not connecting during bootup. Are there any other suggestions, before I report as a bug? Edited July 3, 2008 by edwardp Quote Link to comment Share on other sites More sharing options...
edwardp Posted June 28, 2008 Author Report Share Posted June 28, 2008 (edited) After re-entering "chkconfig ntpd off" and adding "service ntpd start" back onto /etc/rc.local, I rebooted the computers into both runlevel 3 first, then into runlevel 5. On both reboots, ntp connected successfully, which would seem to indicate this is an intermittent problem. runlevel 3: Jun 28 14:27:23 mandrivatwo ntpdate[4358]: step time server 128.10.252.6 offset 14401.106439 sec Jun 28 14:27:23 mandrivatwo ntpd[4368]: ntpd 4.2.4p4@1.1520-o Fri Mar 14 06:59:25 UTC 2008 (1) Jun 28 14:27:23 mandrivatwo ntpd[4369]: precision = 10.000 usec Jun 28 14:27:23 mandrivatwo ntpd[4369]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16 Jun 28 14:27:23 mandrivatwo ntpd[4369]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled Jun 28 14:27:23 mandrivatwo ntpd[4369]: Listening on interface #1 wildcard, ::#123 Disabled Jun 28 14:27:23 mandrivatwo ntpd[4369]: Listening on interface #2 lo, ::1#123 Enabled Jun 28 14:27:23 mandrivatwo ntpd[4369]: Listening on interface #3 eth0, fe80::203:6dff:fe1b:fc7c#123 Enabled Jun 28 14:27:23 mandrivatwo ntpd[4369]: Listening on interface #4 lo, 127.0.0.1#123 Enabled Jun 28 14:27:23 mandrivatwo ntpd[4369]: Listening on interface #5 eth0, 192.168.1.6#123 Enabled Jun 28 14:27:23 mandrivatwo ntpd[4369]: kernel time sync status 0040 Jun 28 14:27:23 mandrivatwo ntpd[4369]: frequency initialized 48.201 PPM from /var/lib/ntp/drift Jun 28 14:28:36 mandrivatwo ntpd[4369]: ntpd exiting on signal 15 rebooted into runlevel 5: Jun 28 14:33:03 mandrivatwo ntpdate[4453]: step time server 63.240.161.99 offset 14401.229308 sec Jun 28 14:33:03 mandrivatwo ntpd[4463]: ntpd 4.2.4p4@1.1520-o Fri Mar 14 06:59:25 UTC 2008 (1) Jun 28 14:33:03 mandrivatwo ntpd[4464]: precision = 9.000 usec Jun 28 14:33:03 mandrivatwo ntpd[4464]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16 Jun 28 14:33:03 mandrivatwo ntpd[4464]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled Jun 28 14:33:03 mandrivatwo ntpd[4464]: Listening on interface #1 wildcard, ::#123 Disabled Jun 28 14:33:03 mandrivatwo ntpd[4464]: Listening on interface #2 lo, ::1#123 Enabled Jun 28 14:33:03 mandrivatwo ntpd[4464]: Listening on interface #3 eth0, fe80::203:6dff:fe1b:fc7c#123 Enabled Jun 28 14:33:03 mandrivatwo ntpd[4464]: Listening on interface #4 lo, 127.0.0.1#123 Enabled Jun 28 14:33:03 mandrivatwo ntpd[4464]: Listening on interface #5 eth0, 192.168.1.6#123 Enabled Jun 28 14:33:03 mandrivatwo ntpd[4464]: kernel time sync status 0040 Jun 28 14:33:03 mandrivatwo ntpd[4464]: frequency initialized 48.201 PPM from /var/lib/ntp/drift Jun 28 14:36:19 mandrivatwo ntpd[4464]: synchronized to LOCAL(0), stratum 10 Jun 28 14:36:19 mandrivatwo ntpd[4464]: kernel time sync status change 0001 Jun 28 14:37:24 mandrivatwo ntpd[4464]: synchronized to 217.160.252.91, stratum 2 Jun 28 14:40:39 mandrivatwo ntpd[4464]: synchronized to 192.43.244.18, stratum 1 In checking syslog on the other desktop, after doing the chkconfig procedure on that as well, similar results were achieved, ntp connected in both runlevels 3 and 5. Edited June 28, 2008 by edwardp Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted June 29, 2008 Report Share Posted June 29, 2008 If you use ntpd, you shouldn't be using ntpdate. ntpdate is normally run to immediately synchronise time at the moment it is ran, whereas ntpd is the ntp daemon which will do it over a period of time and bring it back into alignment. That is why you're problem is occurring, because somewhere else, ntpdate has been set to run. Providing the ntpd comments in the log file aren't reporting problems I would: 1. Ignore the ntpdate log items. 2. Search round for whatever is causing the ntpdate issue and disable it. If you remember adding ntpdate somewhere, then this will be where you can go back to that config file and disable it. If you didn't, then we'd need to work through ntp config files to find it and remove it. Alternatively, if ntpdate was added to some start script, then remove it and just work with ntpd instead. You can see this, because the pid number in the log files is different for ntpd and ntpdate. Quote Link to comment Share on other sites More sharing options...
edwardp Posted June 29, 2008 Author Report Share Posted June 29, 2008 Ian, This appears to be the Mandriva default. Aside from trying your hack back then, the only thing I did relating to ntp after the Mandriva installation, was to check the box to allow the clock to be sync'd using ntp. At that point, ntp and ntp-client installed automatically. According to the ntp information in the MCC, the ntp package includes ntpdate. Is there a config file that has to be edited to prevent ntpdate from starting? If so, I will need to do this on the two desktops As is, ntp is working fine on the ThinkPad. Quote Link to comment Share on other sites More sharing options...
edwardp Posted June 29, 2008 Author Report Share Posted June 29, 2008 On the other desktop, the weather applet can connect fine and update itself, but ntp can't. :mellow: Can't find host, ntp syncs to LOCAL... Jun 29 15:05:15 mandriva ntpdate[3270]: can't find host 1.us.pool.ntp.org Jun 29 15:05:15 mandriva ntpdate[3270]: can't find host 2.us.pool.ntp.org Jun 29 15:05:15 mandriva ntpdate[3270]: no servers can be used, exiting Jun 29 15:05:16 mandriva ntpdate[3305]: can't find host 0.us.pool.ntp.org Jun 29 15:05:17 mandriva ntpdate[3305]: can't find host 1.us.pool.ntp.org Jun 29 15:05:17 mandriva ntpdate[3305]: can't find host 2.us.pool.ntp.org Jun 29 15:05:17 mandriva ntpdate[3305]: no servers can be used, exiting Jun 29 15:05:18 mandriva ntpdate[3326]: can't find host 0.us.pool.ntp.org Jun 29 15:05:18 mandriva ntpdate[3326]: can't find host 1.us.pool.ntp.org Jun 29 15:05:18 mandriva ntpdate[3326]: can't find host 2.us.pool.ntp.org Jun 29 15:05:18 mandriva ntpdate[3326]: no servers can be used, exiting Jun 29 15:05:19 mandriva ntpdate[3363]: can't find host 0.us.pool.ntp.org Jun 29 15:05:19 mandriva ntpdate[3363]: can't find host 1.us.pool.ntp.org Jun 29 15:05:19 mandriva ntpdate[3363]: can't find host 2.us.pool.ntp.org Jun 29 15:05:20 mandriva ntpdate[3363]: no servers can be used, exiting Jun 29 15:05:21 mandriva ntpdate[3387]: can't find host 0.us.pool.ntp.org Jun 29 15:05:21 mandriva ntpdate[3387]: can't find host 1.us.pool.ntp.org Jun 29 15:05:21 mandriva ntpdate[3387]: can't find host 2.us.pool.ntp.org Jun 29 15:05:21 mandriva ntpdate[3387]: no servers can be used, exiting Jun 29 15:05:22 mandriva ntpdate[3414]: can't find host 0.us.pool.ntp.org Jun 29 15:05:23 mandriva ntpdate[3414]: can't find host 1.us.pool.ntp.org Jun 29 15:05:23 mandriva ntpdate[3414]: can't find host 2.us.pool.ntp.org Jun 29 15:05:23 mandriva ntpdate[3414]: no servers can be used, exiting Jun 29 15:05:24 mandriva ntpdate[3439]: can't find host 0.us.pool.ntp.org Jun 29 15:05:24 mandriva ntpdate[3439]: can't find host 1.us.pool.ntp.org Jun 29 15:05:24 mandriva ntpdate[3439]: can't find host 2.us.pool.ntp.org Jun 29 15:05:24 mandriva ntpdate[3439]: no servers can be used, exiting Jun 29 15:05:28 mandriva ntpd[3516]: ntpd 4.2.4p4@1.1520-o Fri Mar 14 06:59:25 UTC 2008 (1) Jun 29 15:05:28 mandriva ntpd[3538]: precision = 10.000 usec Jun 29 15:05:28 mandriva ntpd[3538]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16 Jun 29 15:05:28 mandriva ntpd[3538]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled Jun 29 15:05:28 mandriva ntpd[3538]: Listening on interface #1 wildcard, ::#123 Disabled Jun 29 15:05:28 mandriva ntpd[3538]: Listening on interface #2 lo, ::1#123 Enabled Jun 29 15:05:28 mandriva ntpd[3538]: Listening on interface #3 eth0, fe80::204:5aff:fe7c:27ec#123 Enabled Jun 29 15:05:28 mandriva ntpd[3538]: Listening on interface #4 lo, 127.0.0.1#123 Enabled Jun 29 15:05:28 mandriva ntpd[3538]: Listening on interface #5 eth0, 192.168.1.3#123 Enabled Jun 29 15:05:28 mandriva ntpd[3538]: kernel time sync status 0040 Jun 29 15:05:28 mandriva ntpd[3538]: frequency initialized 153.130 PPM from /var/lib/ntp/drift Jun 29 15:08:45 mandriva ntpd[3538]: synchronized to LOCAL(0), stratum 10 Jun 29 15:08:45 mandriva ntpd[3538]: kernel time sync status change 0001 Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted June 30, 2008 Report Share Posted June 30, 2008 The ntp package usually includes ntpdate because you can use the daemon or you can use ntpdate. ntpd synchronises the date/time over a period of time, whereas running ntpdate does it immediately without waiting for bringing it back into alignment gradually. Check /etc/sysconfig directory for an ntp related config file. Take a look inside and see if there is anything about ntpdate and it being enabled, if so, disable and save the file. I'm presuming the config file will be here since /etc/ntp.conf is related to the ntpd daemon and not ntpdate. Quote Link to comment Share on other sites More sharing options...
edwardp Posted June 30, 2008 Author Report Share Posted June 30, 2008 (edited) Contents of /etc/sysconfig/ntpd file: # Drop root to id 'ntp:ntp' by default. OPTIONS="-u ntp:ntp -p /var/run/ntpd.pid" # Set to 'yes' to sync hw clock after successful ntpdate SYNC_HWCLOCK=no /etc/ntp.conf: # # Undisciplined Local Clock. This is a fake driver intended for backup # and when no outside source of synchronized time is available. The # default stratum is usually 3, but in this case we elect to use stratum # 0. Since the server line does not have the prefer keyword, this driver # is never used for synchronization, unless no other other # synchronization source is available. In case the local host is # controlled by some external source, such as an external oscillator or # another protocol, the prefer keyword would cause the local host to # disregard all other synchronization sources, unless the kernel # modifications are in use and declare an unsynchronized condition. # server 127.127.1.0 # local clock fudge 127.127.1.0 stratum 10 server 0.us.pool.ntp.org server 1.us.pool.ntp.org server 2.us.pool.ntp.org # # Drift file. Put this in a directory which the daemon can write to. # No symbolic links allowed, either, since the daemon updates the file # by creating a temporary in the same directory and then rename()'ing # it to the file. # driftfile /var/lib/ntp/drift multicastclient # listen on default 224.0.1.1 broadcastdelay 0.008 # # Keys file. If you want to diddle your server at run time, make a # keys file (mode 600 for sure) and define the key number to be # used for making requests. # PLEASE DO NOT USE THE DEFAULT VALUES HERE. Pick your own, or remote # systems might be able to reset your clock at will. # #keys /etc/ntp/keys #trustedkey 65535 #requestkey 65535 #controlkey 65535 #restrict default ignore Edited June 30, 2008 by edwardp Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted July 1, 2008 Report Share Posted July 1, 2008 Hmmm, strange. Gotta find out what's causing this ntpdate to start. Unless there is a cron job running this every half hour or hourly or something. Quote Link to comment Share on other sites More sharing options...
edwardp Posted July 1, 2008 Author Report Share Posted July 1, 2008 Jul 1 17:32:15 mandrivatp ntpdate[5441]: step time server 64.202.112.75 offset 0.800020 sec Jul 1 17:32:16 mandrivatp ntpd[5467]: ntpd 4.2.4p4@1.1520-o Fri Mar 14 06:59:25 UTC 2008 (1) Jul 1 17:32:16 mandrivatp ntpd[5468]: precision = 1.000 usec Jul 1 17:32:16 mandrivatp ntpd[5468]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16 Jul 1 17:32:16 mandrivatp ntpd[5468]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled Jul 1 17:32:16 mandrivatp ntpd[5468]: Listening on interface #1 wildcard, ::#123 Disabled Jul 1 17:32:16 mandrivatp ntpd[5468]: Listening on interface #2 lo, ::1#123 Enabled Jul 1 17:32:16 mandrivatp ntpd[5468]: Listening on interface #3 eth1, fe80::212:f0ff:fe34:5c3d#123 Enabled Jul 1 17:32:16 mandrivatp ntpd[5468]: Listening on interface #4 lo, 127.0.0.1#123 Enabled Jul 1 17:32:16 mandrivatp ntpd[5468]: Listening on interface #5 eth1, 192.168.1.4#123 Enabled Jul 1 17:32:16 mandrivatp ntpd[5468]: kernel time sync status 0040 Jul 1 17:32:16 mandrivatp ntpd[5468]: frequency initialized 85.515 PPM from /var/lib/ntp/drift Jul 1 17:35:28 mandrivatp ntpd[5468]: synchronized to LOCAL(0), stratum 10 Jul 1 17:35:28 mandrivatp ntpd[5468]: kernel time sync status change 0001 Jul 1 17:36:33 mandrivatp ntpd[5468]: synchronized to 204.9.136.253, stratum 2 Today, it worked. Nontheless, I reported it as a bug. Quote Link to comment Share on other sites More sharing options...
scarecrow Posted July 2, 2008 Report Share Posted July 2, 2008 Just a hint: Try openntpd instead. For me, it works much better than ntp, and that is right out of the box- without any configuration. Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted July 2, 2008 Report Share Posted July 2, 2008 If the error is only pertinent to ntpdate then ignore it. ntpd if you use this command: ntpq -p will list your time servers that you've configured and you can usually tell from this if it's working. Quote Link to comment Share on other sites More sharing options...
edwardp Posted July 2, 2008 Author Report Share Posted July 2, 2008 (edited) If the error is only pertinent to ntpdate then ignore it. ntpd if you use this command: ntpq -p will list your time servers that you've configured and you can usually tell from this if it's working. I just tried this on my ThinkPad, servers were listed, so it must have connected on the first attempt during bootup. I need to run this on the desktops. Edited July 2, 2008 by edwardp Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted July 3, 2008 Report Share Posted July 3, 2008 This command shows what servers are listed, but check that the last number isn't 4000. If it is, your sync isn't working. I think some scheduled process, maybe in /etc/cron.hourly, or another cron.whatever directory is trying to run ntpdate perhaps. Or in some other crontab somewhere. This won't connect if ntpd is running anyhow - and usually gives a connect error. I've never had ntpdate work - ever. Quote Link to comment Share on other sites More sharing options...
edwardp Posted July 3, 2008 Author Report Share Posted July 3, 2008 It's been solved. resolvconf was the culprit. Once I turned it off in the MCC and rebooted, ntp and ntpdate now work as expected, each and every time. :) Quote Link to comment Share on other sites More sharing options...
David Batson Posted July 3, 2008 Report Share Posted July 3, 2008 Sometimes I think resolvconf creates more issues than it resolves. Glad you got it sorted... :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.