Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-13-2011, 07:34 AM
|
#1
|
Member
Registered: Jan 2010
Posts: 125
Rep:
|
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.
|
|
|
05-13-2011, 07:57 AM
|
#2
|
Member
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770
Rep:
|
With ntpd running what does this command show?
|
|
|
05-13-2011, 09:02 AM
|
#3
|
Member
Registered: Jan 2010
Posts: 125
Original Poster
Rep:
|
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
|
|
|
|
05-13-2011, 10:54 AM
|
#4
|
Moderator
Registered: Aug 2002
Posts: 26,737
|
Post the ntp.conf files for your time servers. 192.168.0.12 and 192.168.0.13
|
|
|
05-14-2011, 02:57 AM
|
#5
|
Member
Registered: Jan 2010
Posts: 125
Original Poster
Rep:
|
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.
|
|
|
05-15-2011, 08:32 PM
|
#6
|
Moderator
Registered: Aug 2002
Posts: 26,737
|
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
|
|
|
05-17-2011, 08:51 AM
|
#7
|
Member
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770
Rep:
|
If the offset is that high NTP has problems syncing. Try stopping ntp then running:
Then restarting ntp and running the ntp -q command again. Also check /var/log/messages and /var/log/ntp.log
|
|
|
All times are GMT -5. The time now is 08:05 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|