Re: Fedora 7: a problem with ntp ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2007-09-07 at 21:51 +0400, Andrew Junev wrote:
> Friday, September 7, 2007, 9:16:08 PM, you wrote:
> 
> > On Fri, 2007-09-07 at 17:44 +0100, Andy Green wrote:
> >> ntp has a "sanity check" limit, if the actual clock and the ntp time
> >> differ by more than this (1000s? one thousand somethings IIRC) then it
> >> just gives up.
> 
> Ok, I stopped ntpd, ran ntpdate manually and it synced the clocks.
> Then I started ntpd again and it still couldn't get synced. So it's
> not a 'sanity check' who is not letting the ntpd work.
> 
> > Make sure you have the IP addresses of your NTP servers in BOTH the
> > /etc/ntp/ntpservers and /etc/ntp/step-tickers files.  The first thing
> > the startup script does is try to run "ntpdate" using the entries in
> > the ntpservers file.  That will drag your clock into sync with the
> > servers by brute force, then ntpd can keep it synced.
> 
> Ok, I checked the /etc/ntp/ntpservers and they are the same on both
> Fedora Core 6 and Fedora 7 machines containing just 2 lines:
> clock.redhat.com
> clock2.redhat.com
> 
> /etc/ntp/step-tickers are empty on both machines. I have put the same
> lines there from 'ntpservers' file but it didn't help.

Did you do a "service ntpd restart"?

> Oh! I forgot to mention one thing. ntpdate by itself doesn't
> work without any parameters given. I have to manually point it to an
> ntp server - only then the time gets synced:
> [root@frontend ~]# ntpdate
>  7 Sep 21:46:04 ntpdate[3909]: no servers can be used, exiting
> [root@frontend ~]# ntpdate  213.203.238.82
>  7 Sep 21:46:11 ntpdate[3910]: step time server 213.203.238.82 offset -0.872507 sec
> [root@frontend ~]#
> 
> Maybe this is also important.

Yes, ntpdate requires you to pass it a clock server.  I made a minor
boo-boo in saying the /etc/rc.d/init.d/ntpd script uses the clock
sources from ntpservers...it uses step-tickers.  If you see the startup
message "Synchronizing with time server:", then it's trying the ntpdate
command.  If it comes up with "[OK]", then it succeeded and the ntpd
daemon SHOULD be able to keep you in sync (unless your clock is REALLY
fast...in which case you have other problems).

The actual ntpd daemon startup is indicated by the startup message
"Starting ntpd".

Just for your info, here are my files:

[root@golem3 ~]# cat /etc/ntp/ntpservers
clock.redhat.com
clock2.redhat.com
[root@golem3 ~]# cat /etc/ntp/step-tickers
clock.redhat.com
clock2.redhat.com

Works fine for me.  You do have port 123 open on your firewall, right?

----------------------------------------------------------------------
- Rick Stevens, Principal Engineer             rstevens@xxxxxxxxxxxx -
- CDN Systems, Internap, Inc.                http://www.internap.com -
-                                                                    -
-         C program run. C program crash. C programmer quit.         -
----------------------------------------------------------------------


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux