LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-14-2015, 07:49 PM   #1
yashraj221087
Member
 
Registered: Jul 2010
Posts: 44

Rep: Reputation: 0
NTP syncing and losing it in few seconds.


Hi,

I am having an issue with NTP on red hat linux box. When I restart ntp, the server is able to sync with the clocks, (*, + & + ) but after some time (few seconds or 1 min), it's losing back the sync.

Can anyone tell me why its so ? and how can I fix it ?
 
Old 02-15-2015, 06:30 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,104

Rep: Reputation: 6059Reputation: 6059Reputation: 6059Reputation: 6059Reputation: 6059Reputation: 6059Reputation: 6059Reputation: 6059Reputation: 6059Reputation: 6059Reputation: 6059
Not information provided to say anything.

Are you using a ntp pool server or syncing to your own? A few seconds or min is typically not enough time to sync i.e. *,+ or -. Post the output of the command:
ntpq -pn
 
1 members found this post helpful.
Old 02-15-2015, 10:39 AM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,119

Rep: Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044
Quote:
Originally Posted by yashraj221087 View Post
Hi,
I am having an issue with NTP on red hat linux box. When I restart ntp, the server is able to sync with the clocks, (*, + & + ) but after some time (few seconds or 1 min), it's losing back the sync.

Can anyone tell me why its so ? and how can I fix it ?
The basics as to "why" usually boil down to too much difference between the system clock to start with, and the NTP daemon. Did you sync your system clock FIRST, before trying to start NTP??? Something like "sntp -s pool.ntp.org"??

And if this is a virtual machine, there are often times patches that MUST be loaded, otherwise the system will drift uncontrollably, no matter WHAT you do.
 
Old 02-15-2015, 05:53 PM   #4
yashraj221087
Member
 
Registered: Jul 2010
Posts: 44

Original Poster
Rep: Reputation: 0
@Michaelk : Here is ntpq -pn

remote refid st t when poll reach delay offset jitter
==============================================================================
clock01 .GPS. 1 u 2 64 17 35.680 31053.1 12172.9
clock02 .GPS. 1 u 67 64 17 46.185 30814.5 16672.6
clock03 .GPS. 1 u 64 64 17 62.991 30830.5 16633.0



@TB0ne: Yes this is VM. I did sync it using system clock - ntpdate -s pool.ntp.org
 
Old 02-16-2015, 06:40 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,104

Rep: Reputation: 6059Reputation: 6059Reputation: 6059Reputation: 6059Reputation: 6059Reputation: 6059Reputation: 6059Reputation: 6059Reputation: 6059Reputation: 6059Reputation: 6059
So what are you running i.e vmware, virtualbox etc.
 
Old 02-16-2015, 09:58 AM   #6
yashraj221087
Member
 
Registered: Jul 2010
Posts: 44

Original Poster
Rep: Reputation: 0
It's on ESX host.
 
Old 02-16-2015, 10:13 AM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,104

Rep: Reputation: 6059Reputation: 6059Reputation: 6059Reputation: 6059Reputation: 6059Reputation: 6059Reputation: 6059Reputation: 6059Reputation: 6059Reputation: 6059Reputation: 6059
A VM requires some configuration changes.

http://kb.vmware.com/selfservice/mic...rnalId=1006427
 
Old 02-16-2015, 10:18 AM   #8
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,119

Rep: Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044
Quote:
Originally Posted by yashraj221087 View Post
It's on ESX host.
Please read the "Question Guidelines" link in my posting signature. You're not providing details, and having to keep asking for them over and over isn't too pleasant.

You still don't say what version of Red Hat you're using, whether you're paying for it, or what version of ESX either. Again, as michaelk pointed out, you probably need to perform some changes to your system. And AGAIN, you will ALSO probably have to have a patch from Red Hat and/or VMWare for this to function correctly. Have you contacted either Red Hat or VMware support yet??? You're paying for support, since both are commercial products, and they can advise you about the patches you may need.
 
Old 02-16-2015, 11:28 AM   #9
yashraj221087
Member
 
Registered: Jul 2010
Posts: 44

Original Poster
Rep: Reputation: 0
Hello there,

The vmware link provided fixed it out. Had to disable the VMware Tools periodic time synchronization.
Quote:
vmware-toolbox-cmd timesync disable
Working fine now.


And here is the OS config:

Red Hat Enterprise Linux Server release 6.6 (Santiago)
2.6.32-431.29.2.el6.x86_64

ESX 5.1.0

Sorry forgot to post it in previous posts.


Thank you both for the responses.
 
Old 02-16-2015, 11:58 AM   #10
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,119

Rep: Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044
Quote:
Originally Posted by yashraj221087 View Post
Hello there,
The vmware link provided fixed it out. Had to disable the VMware Tools periodic time synchronization. Working fine now.
Probably WON'T be in a while...because....
Quote:
And here is the OS config:

Red Hat Enterprise Linux Server release 6.6 (Santiago) 2.6.32-431.29.2.el6.x86_64
ESX 5.1.0
You're using a fairly old version of ESX, and a dated version of RHEL. Again, ARE YOU PAYING for them??? Because there is a patch you have to load to KEEP NTP running, because it will drift very easily. That patch is available to ESX customers, and to RHEL customers. NTP will sync, and may stay ok for up to a day...but chances are it won't keep running much longer than that, unless you've applied the patch to your ESX.
 
  


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 04:47 AM
NTP client is not syncing to ntp server LittleMaster Linux - Newbie 6 04-05-2013 02:37 PM
NTP - syncs initially, eventually stops syncing, uses LOCAL clock cvillepete Linux - Newbie 9 02-21-2012 03:03 PM
Ntp time syncing problem when booting shan_nathan Linux - Desktop 1 11-23-2007 07:51 AM
ntp is only syncing with local clock. slackamp Linux - Server 2 11-07-2007 03:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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