LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-18-2007, 02:46 PM   #1
bluethumb
Member
 
Registered: Jan 2006
Distribution: RHEL 4, Scientific Linux, Centos, Ubuntu
Posts: 58

Rep: Reputation: 15
Unhappy ntpd won't synchronize


We have several computers running clones of RHEL5. ntp works like a charm on all but one of them. I can't figure out the problem. Here's how it looks after a few minutes running:
Quote:
# ntpq
ntpq> peers
remote refid st t when poll reach delay offset jitter
==============================================================================
cilantro.Stanfo 171.64.7.87 2 u 83 256 377 0.280 6189.21 2154.40
grandfather.Sta .GPS. 1 u 80 256 377 0.236 5564.94 2326.33
*LOCAL(0) .LOCL. 10 l 13 64 377 0.000 0.000 0.001
The offset and jitter values are ridiculous. The ntp version is 4.2.2.

I copied ntp.conf from another machine which is running properly. Here
it is:
Quote:
restrict default nomodify notrap noquery
restrict 127.0.0.1
server time.stanford.edu
server clock.stanford.edu
server 127.127.1.0
fudge 127.127.1.0 stratum 10
driftfile /var/lib/ntp/drift
broadcastdelay 0.008
keys /etc/ntp/keys
restrict 0.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery
restrict 1.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery
restrict 2.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery
Clearly the last 3 lines are superfluous, but they don't seem to hurt the other machine.
 
Old 10-19-2007, 10:52 AM   #2
XaViaR
Member
 
Registered: Dec 2004
Distribution: RHEL, CentOS, SuSE
Posts: 170

Rep: Reputation: 31
does this server happen to be a virtual machine?
 
Old 10-19-2007, 12:25 PM   #3
bluethumb
Member
 
Registered: Jan 2006
Distribution: RHEL 4, Scientific Linux, Centos, Ubuntu
Posts: 58

Original Poster
Rep: Reputation: 15
No. It's an ordinary Dell.
 
Old 10-19-2007, 04:14 PM   #4
XaViaR
Member
 
Registered: Dec 2004
Distribution: RHEL, CentOS, SuSE
Posts: 170

Rep: Reputation: 31
How 'bout using this ntp.conf file and then restart ntpd. Good luck!

Code:
# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
restrict default ignore

# Permit all access over the loopback interface.  This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1 


# -- CLIENT NETWORK -------
# Permit systems on this network to synchronize with this
# time service.  Do not permit those systems to modify the
# configuration of this service.  Also, do not use those
# systems as peers for synchronization.
# restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

# --- OUR TIMESERVERS ----- 
restrict 0.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery nopeer
restrict 1.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery nopeer
server 0.pool.ntp.org prefer
server 1.pool.ntp.org


# --- NTP MULTICASTCLIENT ---
#multicastclient                        # listen on default 224.0.1.1
# restrict 224.0.1.1 mask 255.255.255.255 nomodify notrap
# restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap


# --- GENERAL CONFIGURATION ---
#
# 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

#
# 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
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. Note also that
# ntpd is started with a -A flag, disabling authentication, that
# will have to be removed as well.
#
keys            /etc/ntp/keys
 
Old 10-19-2007, 04:17 PM   #5
XaViaR
Member
 
Registered: Dec 2004
Distribution: RHEL, CentOS, SuSE
Posts: 170

Rep: Reputation: 31
Also, I think depending how far your time is off. You might need to rune `ntpdate 0.pool.ntp.org` to force a time sync. NTPd has to be off when you run that command. After you run it, the time should be sync'd and you will need to start ntpd.
 
Old 10-24-2007, 04:01 PM   #6
bluethumb
Member
 
Registered: Jan 2006
Distribution: RHEL 4, Scientific Linux, Centos, Ubuntu
Posts: 58

Original Poster
Rep: Reputation: 15
Smile Solved!

This turned out to be something unexpected. I had made a new kernel for this machine with the Reiser file system. With the stock kernel, there was no problem. I finally got it to work by reducing the kernel HZ value from 1000 to 250. Then ntpd stays in synch, even with Reiser.

Apparently the problem has something to do with missed interrupts, but that's all I know.

This is kernel 2.6.18 on a 2.4 GHz Intel Core Duo.
 
  


Reply

Tags
kernel, ntpd, reiser


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Synchronize time kenneho Debian 11 01-21-2006 06:08 AM
How do I synchronize clock on Linux? WarlockofVirgo Linux - General 10 09-13-2004 10:12 PM
Tar and synchronize kaboom Linux - Software 4 12-12-2003 04:32 AM
Synchronize Password... chuck77 Linux - General 2 03-13-2002 11:29 AM
Synchronize Password... chuck77 Linux - General 1 03-13-2002 04:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration