LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-14-2009, 12:12 PM   #1
mfischman
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Rep: Reputation: 0
ntp drifting on one server


One of our SLES servers has an issue where time drifts ahead until the ntp process dies. Running 'ntpdate 10.10.10.10' syncs it up again and '/etc/init.d/ntp start' gets the process running again but within a few hours or so the time creeps forward until the process dies.

In the log file /var/log/ntp I see we regularly get the following error:

no servers reachable

Then, after between 10 and 14 minutes it is able to contact a server but then it gets the following sanity check error:

4 Sep 09:40:45 ntpd[30856]: time correction of -1552 seconds exceeds sanity limit (1000); set clock manually to the correct UTC time.

Running '/etc/init.d/ntp status' shows the ntp process is now dead.

Has anyone seen this or knows what is happening and how to fix? Thanks.

Mike
 
Old 09-14-2009, 12:45 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,938

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
What are you using for time servers? Post that section of the ntp.conf file.

Is ntp actually syncing up to a timer server? Post the output of the command:
ntpq -p

The * tells you this is the connected server.

http://networking.ringofsaturn.com/Protocols/ntp.php
 
Old 09-14-2009, 01:42 PM   #3
mfischman
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for the help.

SLES100:~ # ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
+fs1.mydomain XX.XX.XX.XX 2 u 138 1024 377 0.001 24.667 1.929
*fs2.mydomain XX.XX.XX.XX 2 u 186 1024 377 0.001 -10.013 3.260
fs3.mydomain XX.XX.XX.XX 3 u 68 1024 377 1.341 18.028 3.754
+fs4.mydomain XX.XX.XX.XX 2 u 65 1024 377 0.001 -20.906 16.462


SLES100:~ # cat /etc/ntp.conf
################################################################################
## /etc/ntp.conf
##
## Sample NTP configuration file.
## See package 'ntp-doc' for documentation, Mini-HOWTO and FAQ.
## Copyright (c) 1998 S.u.S.E. GmbH Fuerth, Germany.
##
## Author: Michael Andres, <ma@suse.de>
##
################################################################################

##
## Radio and modem clocks by convention have addresses in the
## form 127.127.t.u, where t is the clock type and u is a unit
## number in the range 0-3.
##
## Most of these clocks require support in the form of a
## serial port or special bus peripheral. The particular
## device is normally specified by adding a soft link
## /dev/device-u to the particular hardware device involved,
## where u correspond to the unit number above.
##
## Generic DCF77 clock on serial port (Conrad DCF77)
## Address: 127.127.8.u
## Serial Port: /dev/refclock-u
##
## (create soft link /dev/refclock-0 to the particular ttyS?)
##
# server 127.127.8.0 mode 5 prefer

##
## Undisciplined Local Clock. This is a fake driver intended for backup
## and when no outside source of synchronized time is available.
##
#server 127.127.1.0
# local clock (LCL)
#fudge 127.127.1.0 stratum 10
# LCL is unsynchronized

##
## Outside source of synchronized time
##
## server xx.xx.xx.xx # IP address of server

##
## Miscellaneous stuff
##

driftfile /var/lib/ntp/drift/ntp.drift
# path for drift file

logfile /var/log/ntp
server XX.XX.XX.XX
server XX.XX.XX.XX
server XX.XX.XX.XX
server XX.XX.XX.XX
# alternate log file
# logconfig =syncstatus + sysevents
# logconfig =all

# statsdir /tmp/ # directory for statistics files
# filegen peerstats file peerstats type day enable
# filegen loopstats file loopstats type day enable
# filegen clockstats file clockstats type day enable

#
# Authentication stuff
#
# keys /etc/ntp.keys # path for keys file
# trustedkey 1 2 3 4 5 6 14 15 # define trusted keys
# requestkey 15 # key (7) for accessing server variables
# controlkey 15 # key (6) for accessing server variables
 
Old 09-14-2009, 03:18 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,938

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
I assume you are using local time servers?
Enabling the local server (commenting the lines for the fake server) should keep ntp from dying. At this moment everything looks good. Difficult to determine where the problem lies but without ntp running how fast does the clock drift?

Is this a virtual server?

Last edited by michaelk; 09-14-2009 at 03:26 PM.
 
Old 09-14-2009, 03:28 PM   #5
mfischman
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Original Poster
Rep: Reputation: 0
NTP dies after about four hours.

Our servers point to a few internal time servers which in turn point to time sources on the internet.
 
Old 09-14-2009, 04:54 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,938

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
Look for any process that could be hogging cpu time.
Is this a recent problem? What changes have you made recently to this server.
 
  


Reply


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Time drifting in a virtual environment wischad Linux - Server 2 06-17-2009 05:45 PM
ntp drift file in /etc/ntp instead of /var/lib/ntp - suggestion for a patch in Slack niels.horn Slackware 16 05-07-2009 08:35 PM
Suse server not responding after syncing with NTP Server vipin123 SUSE / openSUSE 2 09-04-2008 04:56 PM
NTP on servers and clocks still drifting apart humbletech99 Linux - Networking 4 10-30-2006 09:41 PM
NTP cannot use server, NTP -d can jerryvapps Linux - Newbie 0 07-28-2004 03:22 PM


All times are GMT -5. The time now is 03: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