Re: Servers reachable, but can't sync
- From: brad@xxxxxxxxxxxxxxxxxxx (Brad Knowles)
- Date: Thu, 8 Sep 2005 16:35:19 GMT
At 9:07 AM -0700 2005-09-08, Greg McCann wrote:
I am stumped. The communications seem to be perfect, and the -q mode functions flawlessly. Yet in -b mode, after communication with the server is complete, ntp decides for unexplained reasons that it was "not suitable".
I don't know what else I can do to troubleshoot this without going into the ntp source code, which I am not really qualified to do.
Reading the official documentation for ntpdate at <http://www.eecis.udel.edu/~mills/ntp/html/ntpdate.html>, I see that using the "-b" option is supposed to force the system to always step the time with the settimeofday() system call, even in those circumstances when it would normally just slew the clock with the adjtime() system call, such as would happen if your offset was less than +/- 0.5 seconds.
Checking the description for the "-q" option, I see that it is used for query only, and doesn't actually set the system clock.
Are you sure you're running these commands as root? If you're not root, you're not likely to have the privileges required to perform the necessary system calls to do the things you want.
Or, maybe you're running on something like SELinux, and even though you're root, the commands are not being given the necessary privileges to actually set the system clock. In that case, you might need to turn off SELinux, or disable the control that SELinux has over the necessary system calls.
Moreover, it doesn't seem to be necessary to use the "-b" option, since ntpdate would go ahead and set the system clock with the settimeofday() system call if you're more than +/- 0.5 seconds off, and slewing the system clock with the adjtime() system call for offsets of less than +/- 0.5 seconds doesn't seem to be such a bad thing.
What happens when you try to run a real "ntpd -gq" instead of ntpdate? Can you show us what the tcpdump looks like? Can you run the programs with the "-d" option, so that we can see some more debugging output, to get a better idea of what's really going on?
When running ntpdate, have you made sure that you don't already have a copy of ntpd running? If so, then you're either going to want to leave ntpd alone and not run ntpdate, or you should stop ntpd before running ntpdate.
Speaking of which, have you looked in your log files to see if there are any entries from ntpdate or ntpd that are complaining about being unable to set the clock? If not, are you sure you've got your /etc/syslog.conf file set up correctly so that you would see these complaints if they were being logged?
There's lots more questions that I could ask, but these just occurred to me off-the-top-of-my-head.
-- Brad Knowles, <brad@xxxxxxxxxxxxxxxxxxx>
"Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety."
-- Benjamin Franklin (1706-1790), reply of the Pennsylvania
Assembly to the Governor, November 11, 1755SAGE member since 1995. See <http://www.sage.org/> for more info. _______________________________________________ questions mailing list questions@xxxxxxxxxxxxxxxxx https://lists.ntp.isc.org/mailman/listinfo/questions
.
- References:
- NTP Public Services Project help - +1 hour setting
- From: MrBr
- Re: NTP Public Services Project help - +1 hour setting
- From: Eugen COCA
- Re: NTP Public Services Project help - +1 hour setting
- From: MrBr
- Re: NTP Public Services Project help - +1 hour setting
- From: David J Taylor
- Re: NTP Public Services Project help - +1 hour setting
- From: Heiko Gerstung
- Re: NTP Public Services Project help - +1 hour setting
- From: MrBr
- Servers reachable, but can't sync
- From: Greg McCann
- Re: Servers reachable, but can't sync
- From: Harlan Stenn
- Re: Servers reachable, but can't sync
- From: Greg McCann
- Re: Servers reachable, but can't sync
- From: David Woolley
- Re: Servers reachable, but can't sync
- From: Greg McCann
- NTP Public Services Project help - +1 hour setting
- Prev by Date: Re: Still Authentication
- Next by Date: Re: Servers reachable, but can't sync
- Previous by thread: Re: Servers reachable, but can't sync
- Next by thread: Re: Servers reachable, but can't sync
- Index(es):
Relevant Pages
|
|