LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 10-13-2011, 02:17 PM   #1
karlochacon
Member
 
Registered: Dec 2006
Posts: 107

Rep: Reputation: 17
NTP Client Sync not working


hi guys

I have 7 Red Hat servers 5.7 there are 2 NTP Severs based on Windows. These two servers are used by Windows and Linux Machines for time sync...Windows Servers sync fine nut my 7 Red Hat are not

I use the ntpdate -u NTP1 NTP2 and time is sync but one one later time is not sync anymore
In fact I configured them yesterday and today there are one hour ahead....

This is my configuration
1. Configure /etc/ntp.conf
Code:
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery

restrict 127.0.0.1
restrict -6 ::1

# Use public servers from the pool.ntp.org project.
server 101.122.3.111
server 101.122.6.112

broadcastdelay  0.008
authenticate no

server  127.127.1.0     # local clock
fudge   127.127.1.0 stratum 10

keys /etc/ntp/keys
2. set the date
Code:
ntpdate -u NTP1 NTP2
3. Start the NTP daemon
Code:
service ntpd start
4. Add ntpd to bootup
Code:
chkconfig ntpd on
any idea why is this happening?
I mean I configured NTP before but in Linux-Linux environment and they have worked....now the clock for these linux is going faster

thanks a lot for any input
 
Old 10-13-2011, 03:18 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
not without some useful information... what does "ntpq -pn" say? where are these ntp servers syncing to themselves?
 
Old 10-13-2011, 03:31 PM   #3
karlochacon
Member
 
Registered: Dec 2006
Posts: 107

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by acid_kewpie View Post
not without some useful information... what does "ntpq -pn" say? where are these ntp servers syncing to themselves?
I am not onsite right now but this was an output I took yesterday

ntpq
ntpq> peers
remote refid st t when poll reach delay offset jitter
==============================================================================
crcordc01.bacne 10.124.50.52 4 u 936 1024 377 0.887 -22208. 17615.0
crcordc02.bacne 10.124.50.52 4 u 933 1024 377 0.707 -22147. 17667.9
*LOCAL(0) .LOCL. 10 l 5 64 377 0.000 0.000 0.001

I can go today and take the command you asked

about where windows NTP Servers are sync let me find out that for you
 
Old 10-13-2011, 04:33 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
well they are syncing to 10.124.50.52 as the output shows. Looks like the time provided is too far off to sync, what happens if you ntpdate again and start ntpd again?
 
Old 10-13-2011, 08:06 PM   #5
karlochacon
Member
 
Registered: Dec 2006
Posts: 107

Original Poster
Rep: Reputation: 17
hi guys

I went onsite.

Some stuff I discovered today. First of all these Linux are Virtual Machines running on Hyper-V in case this is relevant I am mentioning.

Second these are 7 server.

1 Red Hat 5.7 x64 - Sync with external NTPs since it has internet access 0.rhel.pool.ntp.org - 1.rhel.pool.ntp.org This server is working just fine time is always OK. But at this time I don't why is that. I mean
is it because RH 5.7 has better time sync than RH 5.5? or is it because is using this public NTPs?

6 Red Hat 5.5 x64 - These are in a DMZ so they synchronize with 2 Windows Servers which are synchronizing with another NTP Servers in USA and these servers which are in USA are synchronizing with public NTPs like the ones above.

now let me show you some output of the ntpq -pn command

RH 5.7
As you can see NTP 38.229.71.1 is being used as NTP Server
Code:
remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+184.22.51.42    128.118.25.5     2 u   57   64   37   36.844   -8.795  26.897
*38.229.71.1     172.16.65.22     2 u   52   64   37   91.484  -12.876  28.096
+71.252.219.43   69.25.96.13      2 u   47   64   37   84.564   -3.186  28.744
 127.127.1.0     .LOCL.          10 l   25   64   77    0.000    0.000   0.001
Now output from the servers where time goes fast
As you can see I waited for about 30-45 minutes and 127.127.1.0 always was the source
you know the 10.x.x.x should be elected in order to be an external NTP server to sync with but these 2 servers never got sync with the NTP servers configured in its ntp.conf

Code:
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 10.122.2.198    10.124.50.52     4 u  197 1024  377    1.079  -55406. 30150.0
 10.122.5.177    10.124.50.52     4 u  209 1024  377    0.849  -55135. 30095.1
*127.127.1.0     .LOCL.          10 l    1   64  377    0.000    0.000   0.001

    remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 10.122.2.198    10.124.50.52     4 u   20   64   37    1.011  -7434.2 3958.52
 10.122.5.177    10.124.50.52     4 u   20   64   37    1.205  -3130.6 2773.80
*127.127.1.0     .LOCL.          10 l   15   64   37    0.000    0.000   0.001

now /etc/ntp.conf is identical for RH 5.7 and RH 5.5 obviously NTP Servers changes.

Code:
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery

restrict 127.0.0.1
restrict -6 ::1

RH 5.7
server 0.rhel.pool.ntp.org
server 1.rhel.pool.ntp.org

RH 5.5
server 10.122.2.198
server 10.122.5.177

server  127.127.1.0     # local clock
fudge   127.127.1.0 stratum 10

driftfile /var/lib/ntp/drift

keys /etc/ntp/keys
Final no errors in messages...
and iptables and ip6tables are stopped

any input or ideas guys?

thanks a lot

Last edited by karlochacon; 10-13-2011 at 08:08 PM.
 
  


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 client not working in linux 4 harendra bisht Linux - Newbie 8 12-08-2014 01:57 PM
ntp does not sync on Slackware 13.1 Squall90 Slackware 3 07-21-2010 08:18 AM
NTP sync noir911 Linux - Server 1 03-29-2008 07:50 PM
NTP Sync? carlosinfl Linux - Networking 12 04-13-2006 11:33 AM
NTP Client How to Sync automatically minil Programming 3 03-03-2005 03:52 AM


All times are GMT -5. The time now is 04:23 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration