LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-13-2011, 07:34 AM   #1
zaeem
Member
 
Registered: Jan 2010
Posts: 125

Rep: Reputation: 15
NTP Issues


Dear Guys,

I have been working on NTP to find out resolution of my issues unable to find. let me briefly explain here. I have three servers and no server is fully synced with remote NTP server.

Server 1:
/etc/ntp.conf is as follows;
Quote:
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict -6 ::1
server 192.168.0.12
server 192.168.0.13
driftfile /var/lib/ntp/drift
logfile /var/log/ntp.log
keys /etc/ntp/keys
NTP log shows following

Quote:
13 May 15:46:43 ntpd[3417]: synchronized to 192.168.0.12, stratum 1
13 May 15:46:48 ntpd[3417]: time reset +5.334444 s
13 May 15:46:48 ntpd[3417]: kernel time sync disabled 0001
13 May 15:50:43 ntpd[3417]: synchronized to 192.168.0.12, stratum 1
13 May 15:51:49 ntpd[3417]: no servers reachable
Server 2
/etc/ntp.conf has following entries

Quote:
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict -6 ::1
server 192.168.0.12
server 192.168.0.13
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
driftfile /var/lib/ntp/drift
logfile /var/log/ntp.log
keys /etc/ntp/keys
log file shows

Quote:
13 May 16:57:29 ntpd[10020]: synchronized to 192.168.0.12, stratum 1
13 May 16:58:35 ntpd[10020]: synchronized to LOCAL(0), stratum 10
13 May 16:59:40 ntpd[10020]: synchronized to 192.168.0.12, stratum 1
13 May 17:00:43 ntpd[10020]: synchronized to LOCAL(0), stratum 10
13 May 17:00:46 ntpd[10020]: synchronized to 192.168.0.12, stratum 1
13 May 17:01:49 ntpd[10020]: synchronized to LOCAL(0), stratum 10
13 May 17:02:53 ntpd[10020]: synchronized to 192.168.0.12, stratum 1
13 May 17:03:58 ntpd[10020]: synchronized to LOCAL(0), stratum 10
Server 3
/etc/ntp.conf has following entries

Quote:
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict -6 ::1
server 192.168.0.12
server 192.168.0.13
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
driftfile /var/lib/ntp/drift
logfile /var/log/ntp.log
keys /etc/ntp/keys
log file shows

Quote:
13 May 16:53:26 ntpd[4412]: synchronized to 192.168.0.12, stratum 1
13 May 16:54:31 ntpd[4412]: synchronized to LOCAL(0), stratum 10
13 May 16:55:36 ntpd[4412]: synchronized to 192.168.0.12, stratum 1
13 May 16:56:40 ntpd[4412]: synchronized to LOCAL(0), stratum 10
13 May 16:57:46 ntpd[4412]: synchronized to 192.168.0.12, stratum 1
13 May 16:58:52 ntpd[4412]: synchronized to LOCAL(0), stratum 10
13 May 16:59:56 ntpd[4412]: synchronized to 192.168.0.12, stratum 1
13 May 17:01:02 ntpd[4412]: synchronized to LOCAL(0), stratum 10
13 May 17:02:08 ntpd[4412]: synchronized to 192.168.0.12, stratum 1

I don't know why it sync time alternatively with remote NTP server and LOCAL whereas there is not issue in connectivity/reachability of NTP server and NTP clients. Also server 1 reporting kernel time sync disabled 0001. Please help me to resolve these issues.

Note: All servers has CentOS 5.5 installed.
 
Old 05-13-2011, 07:57 AM   #2
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 44
With ntpd running what does this command show?

Quote:
ntpq -p
 
Old 05-13-2011, 09:02 AM   #3
zaeem
Member
 
Registered: Jan 2010
Posts: 125

Original Poster
Rep: Reputation: 15
Dear ncsuapex,

Thanks for reply. Following is the information you asked.


Server 1

Quote:
# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
192.168.0.12 .GPS. 1 u 49 64 377 1.332 457.550 20.541
192.168.0.13 LOCAL(0) 11 u 61 64 377 16.983 -944.08 20.403
Server 2

Quote:
# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
192.168.0.12 .GPS. 1 u 119 1024 377 1.711 82.611 19.481
192.168.0.13 LOCAL(0) 11 u 534 1024 377 17.525 -1306.5 19.427
*LOCAL(0) .LOCL. 10 l 12 64 377 0.000 0.000 0.001
Server 3

Quote:
# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
192.168.0.12 .GPS. 1 u 337 1024 377 1.555 137883. 162.458
192.168.0.13 LOCAL(0) 11 u 691 1024 377 17.235 136426. 162.288
*LOCAL(0) .LOCL. 10 l 64 64 377 0.000 0.000 0.001
 
Old 05-13-2011, 10:54 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,737

Rep: Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316
Post the ntp.conf files for your time servers. 192.168.0.12 and 192.168.0.13
 
Old 05-14-2011, 02:57 AM   #5
zaeem
Member
 
Registered: Jan 2010
Posts: 125

Original Poster
Rep: Reputation: 15
Dear michaelk,

I don't have access to .12 and .13 time servers. However I will try to get conf files.

Last edited by zaeem; 05-16-2011 at 05:34 AM.
 
Old 05-15-2011, 08:32 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,737

Rep: Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316
Are these real or virtual machines?
For some reason the ntp servers have a offset and jitter are high and so ntp uses the local clock as the best source. Server 1 is not configured to use the local clock.

You could try
Code:
server 192.168.0.12 burst iburst
server 192.168.0.13 burst iburst
 
Old 05-17-2011, 08:51 AM   #7
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 44
If the offset is that high NTP has problems syncing. Try stopping ntp then running:

Quote:
ntpdate 192.168.0.12

Then restarting ntp and running the ntp -q command again. Also check /var/log/messages and /var/log/ntp.log
 
  


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
ntp drift file in /etc/ntp instead of /var/lib/ntp - suggestion for a patch in Slack niels.horn Slackware 16 05-07-2009 07:35 PM
NTP Issues piercey Linux - Server 2 01-13-2009 11:11 AM
NTP issues RHEL5 adamjohnson01 Red Hat 4 06-06-2008 07:23 AM
NTP issues? Blinker_Fluid Solaris / OpenSolaris 8 05-30-2008 01:42 AM
Time and NTP issues gauge73 Linux - Software 3 04-21-2008 08:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:05 AM.

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
Open Source Consulting | Domain Registration