Submitted by blackfox on Sun, 09/29/2013 - 13:54
I don' have any problems with the Dovecot IMAP / POP3 Server everything is working normally as far as I can tell.
The strange thing is that when I log on and check the System Information under Status the Dovecot IMAP / POP3 Server shows that it's stopped.
I click Start Dovecot and and the server shows running. I log off and on again and the server still shows running.
After some time (couple days) I log on again and the Status of the Dovecot IMAP / POP3 Server shows that it's stopped again, but the server was working normally
I have the same problem with all my virtualmin servers
Status:
Active
Comments
Submitted by JamieCameron on Sun, 09/29/2013 - 17:49 Comment #1
When Webmin thinks that Dovecot is down like this, does the file
/var/run/dovecot/master.pid
contain the PID of the running Dovecot server process?Submitted by blackfox on Mon, 09/30/2013 - 20:17 Comment #2
Yes, the file /var/run/dovecot/master.pid contains the PID of the running Dovecot server process.
But checking that directory I found another file that grabbed my attention: master-fatal.lastlog.
Dovecot showed stopped in status (in webmin) and this file disappeared as soon as I started Dovecot up again.
In that file I found the following: Time just moved backwards by 9 seconds. This might cause a lot of problems, so I'll just kill myself now. http://wiki.dovecot.org/TimeMovedBackwards
I checked the website and there: Dovecot isn't very forgiving if your system's time moves backwards. There are usually two possibilities why it's moving backwards:
I have both, ntpdate and it's a virtual server (but I'm not saying it's buggy).
I had "Time server sync" set up in "System Time" and therefore I needed ntpdate to do so. I removed ntpdate and installed ntp instead as recomended by wiki.dovecot.org,
I did this on one server only, the other servers I leave for now to see what result I get
Submitted by JamieCameron on Mon, 09/30/2013 - 21:07 Comment #3
Yeah, Dovecot will crash if it detects a large time change. On a VM that isn't getting its clock synced properly and has Webmin setup to sync the time periodically, this can trigger a crash of Dovecot.
Submitted by blackfox on Tue, 10/01/2013 - 05:10 Comment #4
Ok I got the problem solved.
It was a problem with ntpdate and the way I set up the system. So I never had any problems with Dovecot until, I logged on in webmin after a couple days, and the time had drifted enough.
"System Time" in webmin/ uses ntpdate. But when I look at the ntpdate specs it isn't really the type of program that should be run on a virtualmin server but ntp is.
Wouldn't it be better to provide fine tune settings in virtualmin/webmin for /etc/ntp.conf (as well or only)?
Submitted by Locutus on Tue, 10/01/2013 - 06:23 Comment #5
Indeed it's suggested to use "ntp", which in case of time differences doesn't adjust the clock harshly to the correct time, but does so in a number of "micro-adjustments", to prevent issues you've seen with Dovecot.
ntp doesn't really need a lot of fine-tuning. After installation, all you really could do is edit the time servers it uses by default.
Also, I think I saw in the logs that in later versions of Dovecot, they changed the "time has jumped backwards, I'm going to kill myself now" behavior to "time has jumped, I'm going to sleep for a while".