NTP service is failing on Linux VMware VMs


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, 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.

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.

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

and on boot (put in rc.local) ntpdate -b is ntp server address here.

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
where is your ntp server is it online like ntp.org?
it sounds like a network problem
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

ashsysadAuthor Commented:
@LanTh, We have couple of Local NTP servers (Network devices) to which we sync the time for all our clients.
Just check them with ntpdate and show us log info for ntpd
Also, enable debugging
Is the option for time synchronization between vm and esx turned off?
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.
What distro is it? There are known issue with RHEL / CentOS that may cause time to drift.


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

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

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.
Frank ContrepoisVP Technical SalesCommented:
Let's hope that at least one works :)
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 !
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

From novice to tech pro — start learning today.