NTP service is failing on Linux VMware VMs

Hello,

We have been facing the NTP service issue on various Linux VMware VMs. The NTP service is stopping abruptly and the time is getting reset to UTC.  And when I checked the 'ntpd' service status, it shows "ntpd dead but pid file exists".

Portion of /var/log/messages, which shows the Time is getting reset to UTC:

Dec 12 08:52:50 rvbd-chi-tap01 ntpd[6923]: synchronized to LOCAL(0), stratum 10
Dec 12 08:52:50 rvbd-chi-tap01 ntpd[6923]: kernel time sync disabled 0041
Dec 12 08:53:53 rvbd-chi-tap01 ntpd[6923]: kernel time sync enabled 0001
Dec 12 08:53:56 rvbd-chi-tap01 ntpd[6923]: synchronized to 64.147.176.252, stratum 2
Dec 12 08:53:56 rvbd-chi-tap01 ntpd[6923]: time correction of 3788 seconds exceeds sanity limit (1000); set clock manually to the correct UTC time.


Please give me solution to fix this NTP service issue. I want them to be up and running always and in sync with our NTP servers. Please let me know if you need more details on this.

Thanks.
ashsysadAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

shukalo83Commented:
This is strange.

Any logs in /var/log/syslog or /var/log/messages.
Check the debug option on ntp server.

Temporarily you can try using ntpdate in cron script, every hour and on boot

ntpdate 1.1.1.1
and on boot (put in rc.local) ntpdate -b 1.1.1.1

1.1.1.1 is ntp server address here.

0
Frank ContrepoisVP Technical SalesCommented:
Set the date and time from the command line
date -s "12/13/2011 10:45:00"

Open in new window


then the ntp should work fine
0
IanThCommented:
where is your ntp server is it online like ntp.org?
http://www.ntp.org/
it sounds like a network problem
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

ashsysadAuthor Commented:
@LanTh, We have couple of Local NTP servers (Network devices) to which we sync the time for all our clients.
0
shukalo83Commented:
Just check them with ntpdate and show us log info for ntpd
Also, enable debugging
0
MazdajaiCommented:
Is the option for time synchronization between vm and esx turned off?
0
ashsysadAuthor Commented:
@Mazdajaj,  Yes, we have turned off the time synchronization between VM and ESX.  As we have VMs in different Timezone, we don't want VMs to sync with ESX time.
0
MazdajaiCommented:
What distro is it? There are known issue with RHEL / CentOS that may cause time to drift.

https://bugzilla.redhat.com/show_bug.cgi?id=507834

http://twiki.ntp.org/bin/view/Support/KnownOsIssues#Section_9.2.2.1.
0
Frank ContrepoisVP Technical SalesCommented:
time correction of 3788 seconds exceeds sanity limit (1000); set clock manually to the correct UTC time.

I think this is clear, you tell the OS that the hardware clock is UTC and UTC time on the ntp servers is more than 1000 seconds so ntp will not update the clock.

So you can setup your hardware clock from the bios to UTC time or you can start ntpd with the -g flag

also on http://en.wikipedia.org/wiki/Ntpd

0
JRoyseCommented:
The way I personally get by with the drift being too large for NTP to correct, but wanting to set my time from the network is it kick it with "rdate -s server".  Pick a server from herelook here: http://tf.nist.gov/tf-cgi/servers.cgi

Worst case do this once a day via a crontab entry, best case is line up the virtual host and guest with the same time servers and they stay in sync.

I would also recommend you have your vmware HOST set it's time via NTP also, you don't want the HOST and GUEST time to differ, that is very confusing for everyone!  You can tell Vpshere to use NTP on the config/time/date area through the vsphere client.

and run
rdate -s time_server_name

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ashsysadAuthor Commented:
Thanks for all your suggestions. I'm working on it.
0
Frank ContrepoisVP Technical SalesCommented:
Let's hope that at least one works :)
0
ashsysadAuthor Commented:
I implemented the work-around solution by placing an cron entry to sync to time at regular intervals. Thanks to all for helping me !
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VMware

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.