LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-05-2015, 02:46 PM   #1
claforce
LQ Newbie
 
Registered: Jun 2014
Posts: 17

Rep: Reputation: Disabled
NTP - Time not updating


Hello,
A few months ago we switched the NTP servers that our Linux servers use to point to a couple of windows servers that the rest of the company uses. Since that time we have been having issues with time staying synced up on some of these servers. The servers are all Redhat or CentOS 5.x or 6.x. The strange thing is I can do a ntpd -gq to force an update and it works. I have verified that port 123 is open via "nc -uvz INTERNALSERVER1 123".

Below are a few strange things I have noticed on the servers that are not updating time correctly:

Code:
# ntpq -p
No association ID's returned

Stratum is 16 which I believe means out of sync:
Code:
# ntpq -c readlist
assID=0 status=c011 sync_alarm, sync_unspec, 1 event, event_restart,
version="ntpd 4.2.2p1@1.1570-o Fri Dec 19 18:27:47 UTC 2014 (1)",
processor="x86_64", system="Linux/2.6.18-238.9.1.el5", leap=11,
stratum=16, precision=-20, rootdelay=0.000, rootdispersion=150.435,
peer=0, refid=INIT,
reftime=00000000.00000000  Thu, Feb  7 2036  0:28:16.000, poll=6,
clock=d8f38d56.a53e9da7  Tue, May  5 2015 13:41:26.645, state=1,
offset=0.000, frequency=0.000, jitter=0.001, noise=0.001,
stability=0.000, tai=0
Offset showing as 0 even when time is obviously off:
Code:
# /usr/sbin/ntpq -c "rv 0 offset"
assID=0 status=c011 sync_alarm, sync_unspec, 1 event, event_restart,
offset=0.000
Code:
#  ntpdc -c loopinfo
offset:               0.000000 s
frequency:            0.000 ppm
poll adjust:          0
watchdog timer:       10225 s
The server these examples are from is a Red Hat Enterprise Linux Server release 5.11 (Tikanga).

Let me know if there is more information I can provide.

Below is my ntp.conf:

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 kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery

# 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
restrict -6 ::1

# Hosts on local network are less restricted.
#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).

server INTERNALSERVER1 iburst
server INTERNALSERVER2 iburst

# Drift file.  Put this in a directory which the daemon can write to.
# 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

# Key file containing the keys and key identifiers used when operating
# with symmetric key cryptography.
keys /etc/ntp/keys
Thanks,

Chris.
 
Old 05-06-2015, 08:46 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,385

Rep: Reputation: 3086Reputation: 3086Reputation: 3086Reputation: 3086Reputation: 3086Reputation: 3086Reputation: 3086Reputation: 3086Reputation: 3086Reputation: 3086Reputation: 3086
How are windows servers configured for time?

Are there other linux computers synching with the windows servers? Do they have an internal fudge setting in their ntp.conf file?

Not enough information but in general windows servers only using w32time do not provide enough accuracy to be used by ntp.
 
Old 05-06-2015, 09:07 AM   #3
claforce
LQ Newbie
 
Registered: Jun 2014
Posts: 17

Original Poster
Rep: Reputation: Disabled
michaelk,
Thanks for the response. I don't have access to the windows servers, but can try and get some of that information from their admins. There are serveral of our linux servers that are staying in sync using these servers, however, with the same ntp.conf configuration. The only correlation I've been able to find so far is that the servers having issues are RH 5.6 and 5.11. Some of the servers not having issues are RH 5.8 and 6.6. Is there anything else I can provide besides windows server configuration?
Thanks,

Chris.
 
Old 05-06-2015, 09:47 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,385

Rep: Reputation: 3086Reputation: 3086Reputation: 3086Reputation: 3086Reputation: 3086Reputation: 3086Reputation: 3086Reputation: 3086Reputation: 3086Reputation: 3086Reputation: 3086
What happens if you restart ntp?
 
Old 05-06-2015, 09:55 AM   #5
claforce
LQ Newbie
 
Registered: Jun 2014
Posts: 17

Original Poster
Rep: Reputation: Disabled
It restarts and resyncs the time, but does not sync with the peers. All of the commands return the same as my initial post.
Thanks,

Chris.
 
Old 05-08-2015, 05:09 AM   #6
Vernicronz
Member
 
Registered: Jul 2014
Distribution: Redhat,Centos,Ubuntu
Posts: 54

Rep: Reputation: Disabled
Smile

Hello claforce ,

Try this ,

1. empty the /etc/ntp.conf and add your ntp server IP

>/etc/ntp.conf
vi /etc/ntp.conf
and add the ip

example
[root@airpal ~]# cat /etc/ntp.conf
server 10.0.0.5

2. start the ntp daemon

/etc/init.d/ntpd start


3. check the connection / sync with your ntp server using ntpstat

example
[root@airpal ~]# ntpstat 10.0.0.5
synchronised to NTP server (10.0.0.5) at stratum 4
time correct to within 134 ms
polling server every 1024 s

4. you can verify with ntpq -pn

example
[root@airpal ~]# ntpq -pn
remote refid st t when poll reach delay offset jitter
==============================================================================
*10.0.0.5 2xx.2xx.1x.1xx 3 u 859 1024 377 2.106 29.718 36.905


hope this helps
 
  


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 is not syncing with ntp server time sagar666 Linux - Server 3 12-19-2014 05:47 AM
NTP clients are updating very slow sanjusharma Linux - Newbie 1 02-08-2013 07:25 AM
NTP Server giving central time instead of eastern time wjleon Linux - Networking 3 11-01-2007 05:04 PM
debian: Get time from ntp (network time protocol) servers checkmate3001 LinuxQuestions.org Member Success Stories 0 09-30-2007 07:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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