0

I have a Debian Squeeze VM that has suddenly chosen to jump it's date forwards just over a month, which seems to confuse it no end and cause it to require a hard reset (yikes!).

There is nothing unusual in the logs, except that the datestamp suddenly jumps (today back to 2005).

It's happened three times, so I don't think it's to do with the leap second issue as the last one of those was in July.

When it happened once I spent ages checking stuff but could not find anything, decided to forget it. But three times is becoming an issue on a production server.


Edits providing information requested in comments (thanks!):

I do not have control over the hypervisor, it is a hired VM.

# cat /sys/devices/system/clocksource/clocksource0/current_clocksource
kvm-clock

# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+grendel.exizten 130.149.17.8     2 u   29   64   77   14.811    1.778   1.744
*panoramix.linoc 193.67.79.202    2 u   32   64   77   19.729   -0.419   1.691
+robert.elnounch 213.251.128.249  2 u   27   64   77   17.762    0.600   1.722
-janetzki.eu     83.169.43.165    3 u   31   64   77   27.214    3.575   1.638
artfulrobot
  • 3,401

1 Answers1

1

I've seen several situations where NTP really doesn't like running in a VM. One provider advised me to stop running ntpd, and instead have something like this in /etc/cron.d/ntpdate:

* * * * * root /usr/bin/ntpdate your.ntp.server another.ntp.server > /var/log/ntpdate.log 2>&1

This make the clock on my VMs much more stable, and stopped ntpd from doing the sync-unsync-sync dance.

If you do this, remember to put something appropriate in /etc/logrotate.d to stop the logfile growing indefinitely.

Flup
  • 8,398