[Dovecot] Time just moved backwards error even with ntpd
Scenario: server PC abruptly switched off due to power cable problems (an UPS cannot solve this issue), so during shutdown Linux was not able to resinchronize the system clock. After a few hours the server come back on, Linux booted and the services (ntpd, dovecot and many others) started
But the system clock was 45 minutes ahead, so:
Jan 19 11:13:39 gw ntpd[2112]: synchronized to LOCAL(0), stratum 10 Jan 19 11:13:39 gw ntpd[2112]: kernel time sync disabled 0041 Jan 19 11:14:43 gw ntpd[2112]: synchronized to 62.48.35.100, stratum 2 Jan 19 10:31:55 gw ntpd[2112]: time reset -3600.221385 s Jan 19 10:31:55 gw ntpd[2112]: kernel time sync enabled 0001 Jan 19 10:31:55 gw dovecot: Time just moved backwards by 3600 seconds. This might cause a lot of problems, so I'll just kill myself now. http://wiki.dovecot.org/TimeMovedBackwards
Ciao, luigi
-- / +--[Luigi Rosa]-- \
Spoon boy: Do not try and bend the spoon. That's impossible. Instead... only try to realize the truth. Neo: What truth? Spoon boy: There is no spoon. Neo: There is no spoon? Spoon boy: Then you'll see, that it is not the spoon that bends, it is only yourself. --The Matrix
- Luigi Rosa lrosa@hypertrek.info:
Scenario: server PC abruptly switched off due to power cable problems (an UPS cannot solve this issue), so during shutdown Linux was not able to resinchronize the system clock. After a few hours the server come back on, Linux booted and the services (ntpd, dovecot and many others) started
But the system clock was 45 minutes ahead, so:
Jan 19 11:13:39 gw ntpd[2112]: synchronized to LOCAL(0), stratum 10 Jan 19 11:13:39 gw ntpd[2112]: kernel time sync disabled 0041 Jan 19 11:14:43 gw ntpd[2112]: synchronized to 62.48.35.100, stratum 2 Jan 19 10:31:55 gw ntpd[2112]: time reset -3600.221385 s Jan 19 10:31:55 gw ntpd[2112]: kernel time sync enabled 0001 Jan 19 10:31:55 gw dovecot: Time just moved backwards by 3600 seconds. This might cause a lot of problems, so I'll just kill myself now. http://wiki.dovecot.org/TimeMovedBackwards
Solution: Start ntpdate/ntpd FIRST.
-- Ralf Hildebrandt (Ralf.Hildebrandt@charite.de) plonk@charite.de Postfix - Einrichtung, Betrieb und Wartung Tel. +49 (0)30-450 570-155 http://www.arschkrebs.de I realise computers suck. The only reason why they are a hobby of mine is because I enjoy pain!
Ralf Hildebrandt said the following on 19/01/2008 13.16:
Solution: Start ntpdate/ntpd FIRST.
It's what I did, but it could not solve this specific issue.
Unfortunately, server and ADSL modem router went back online together and the ADSL router takes more time to go online than the server (blame it on Linux and fast processor :)
I was able to replicate this scenario: the ADSL modem/router connects to Internet few second after I get the login on Linux, so even starting ntpd right after the network and dovecot as last service could not help.
Ciao, luigi
-- / +--[Luigi Rosa]-- \
Q: And this, I'm particularly proud of - behind the headlights, stinger missiles! James Bond: Excellent, just the thing for unwinding after a rough day at the office. Q: Need I remind you, 007, that you have a license to kill, not to break traffic laws. --007 Goldeneye
On Sat, 2008-01-19 at 12:46 +0100, Luigi Rosa wrote:
Scenario: server PC abruptly switched off due to power cable problems (an UPS cannot solve this issue), so during shutdown Linux was not
This sounds like rather extreme, exceptional circumstances. And actually an infrastructure problem, rather than software. ;)
able to resinchronize the system clock. After a few hours the server come back on, Linux booted and the services (ntpd, dovecot and many others) started
But the system clock was 45 minutes ahead, so:
No. :)
Jan 19 11:13:39 gw ntpd[2112]: synchronized to LOCAL(0), stratum 10 Jan 19 11:13:39 gw ntpd[2112]: kernel time sync disabled 0041 Jan 19 11:14:43 gw ntpd[2112]: synchronized to 62.48.35.100, stratum 2 Jan 19 10:31:55 gw ntpd[2112]: time reset -3600.221385 s Jan 19 10:31:55 gw ntpd[2112]: kernel time sync enabled 0001 Jan 19 10:31:55 gw dovecot: Time just moved backwards by 3600 seconds. This might cause a lot of problems, so I'll just kill myself now. http://wiki.dovecot.org/TimeMovedBackwards
Exactly one hour. Doesn't strike me as a coincidence...
guenther
--
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i
Am Samstag, 19. Januar 2008 schrieb Karsten Bräckelmann:
2 Jan 19 10:31:55 gw ntpd[2112]: time reset -3600.221385 s Exactly one hour. Doesn't strike me as a coincidence...
Mh, sounds as if the system clock is set to "local time", including DST changes, and the system clock had not yet been adjusted... I know why I use UTC for the system clock on my machines... ;)
Greetings,
Gunter
-- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ "Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life." -- (Terry Pratchett, Jingo) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+PGP-verschlüsselte Mails bevorzugt! +
Gunter Ohrner said the following on 19/01/08 16:47:
Mh, sounds as if the system clock is set to "local time", including DST changes, and the system clock had not yet been adjusted... I know why I use UTC for the system clock on my machines... ;)
Probably. As I said the server lost power without a clean shutdown and its uptime was very high.
Ciao, luigi
-- / +--[Luigi Rosa]-- \
If it's working, the diagnostics say it's fine. If it's not working, the diagnostics say it's fine.
Karsten Bräckelmann said the following on 19/01/2008 13.26:
But the system clock was 45 minutes ahead, so: No. :)
You'r right, my mistake.
Exactly one hour. Doesn't strike me as a coincidence...
Don't know. That machine had a very long uptime. The system is configured to have the hardware clock on GMT.
Ciao, luigi
Ciao, luigi
-- / +--[Luigi Rosa]-- \
We must acknowledge once and for all that the purpose of diplomacy is to prolong a crisis. --Spock, "The Mark of Gideon"
participants (4)
-
Gunter Ohrner
-
Karsten Bräckelmann
-
Luigi Rosa
-
Ralf Hildebrandt