[Dovecot] dovecot and ntp: Fatal: Time just moved backwards

Scott Silva ssilva at sgvwater.com
Mon Jun 8 21:41:40 EEST 2009


on 6-6-2009 2:45 PM Harlan Stenn spake the following:
> Juergen wrote:
>> Harlan wrote:
>>> There is no corrected version of the real-time clock before the PC goes
>>> online.
>> I'd suggest to read chrony's manual. Chrony stores the reference values
>> collected while running online for further use after reboot, even if we
>> have no online connection at that point.
> 
> I'm pretty familiar with ntp in particular and computer timekeeping in
> general.
> 
> I've also seen a fair number of situations where the hardware clock is
> "just wrong", especially after a reboot.
> 
> In my world, it's about getting things to work right in as many cases as
> possible.
> 
>> Of course, this doesn't work if you never have synced with an NTP
>> server.
> 
> And more often than one might think, if one has just rebooted a machine.
> 
> H
> 
> 
I just read the crony manual, and it seems it was written for a use like this.
Over time it looks at the difference between the system clock and the hardware
clock and keeps track of the drift. It does need to sync occasionally to build
the accuracy. Then at startup, it refers to its drift per time calculation and
sets the time based on this estimate. Hopefully it would get fairly close over
a short period of running, and at least close enough to keep dovecot from
erroring.

I suppose you could also write something that watches the logs for "time moved
backwards", and run ntpdate followed by dovecot start.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 258 bytes
Desc: OpenPGP digital signature
Url : http://dovecot.org/pipermail/dovecot/attachments/20090608/1cdec6e5/attachment.bin 


More information about the dovecot mailing list