Date: Tue, 21 Apr 2009 16:48:53 +0200 From: Mel Flynn <mel.flynn+fbsd.questions@mailing.thruhere.net> To: freebsd-questions@freebsd.org Cc: Tim Judd <tajudd@gmail.com> Subject: Re: Preventing ntpd from adjusting time (backwards) Message-ID: <200904211648.53403.mel.flynn%2Bfbsd.questions@mailing.thruhere.net> In-Reply-To: <ade45ae90904210711w289d5c36id4ce4684be50742f@mail.gmail.com> References: <200904211106.01965.mel.flynn%2Bfbsd.questions@mailing.thruhere.net> <49ED9454.5030100@infracaninophile.co.uk> <ade45ae90904210711w289d5c36id4ce4684be50742f@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 21 April 2009 16:11:52 Tim Judd wrote: > On Tue, Apr 21, 2009 at 3:39 AM, Matthew Seaman < > > m.seaman@infracaninophile.co.uk> wrote: > > Mel Flynn wrote: > > > Hi, > > > > > > Some coarse reading of ntpd(8) and ntp.conf(5) doesn't lead me to > > > believe > > > > it's > > > > > possible to make ntpd *not* adjust the time. With adjust I don't mean > > > the > > > > skew > > > > > operation, but really change the time. Backwards is my primary concern > > > > but if > > > > > it can be turned off completely it's fine with me. > > > > > > Reason being dovecot bailing out when this happens: > > > Apr 1 16:18:26 squish ntpd[1353]: time reset -6.711955 s > > > > > > Apr 1 16:18:26 mx1 dovecot: Fatal: Time just moved backwards by 6 > > > > seconds. > > > > > This might cause a lot of problems, so I'll just kill myself now. > > > http://wiki.dovecot.org/TimeMovedBackwards > > > > This seems to be a bete-noir for the dovecot developer. Whatever, it is > > a royal pain in the arse, as my mailserver always steps the time > > backwards on each reboot, and then dovecot does it's dying swan thing. > > > > Three choices: > > > > * Don't run 'ntpd -g' as the documentation tells you is the modern and > > accepted method. Instead, run 'ntpdate' as a separate process and > > run 'ntpd' without the '-g' flag. > > > > * Don't run dovecot. Other IMAP servers do not suffer in the same > > way. > > > > * Put up with it. Avoid reboots, and swear at all concerned any time > > you really do have to reboot. > > > > Cheers, > > > > Matthew > > How about adding ntpdate's provided string to dovecot's required string in > their respective startup rc.d scripts? This forces dovecot to wait until > ntpdate has been called, assuming time has actually been set/changed, then > dovecot may start? That could work, if ntpd_sync_on_start would actually sync on start. Trying not to enable ntpdate unless I really have to, since I expect it to be gone in 8.0. Still, there's a chance ntp steps backwards during the runtime, but then my CMOS battery probably needs replacing anyway. -- Mel
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904211648.53403.mel.flynn%2Bfbsd.questions>