on 2-4-2009 8:14 AM Bruce Bodger spake the following:
I've figured this one out... Just wanted to get it into the dovecot mailing list archive so that somebody in the future might find it if they need it.
Running Dovecot on Mac OS X 10.4.11 and using LaunchDaemon to start. Following a system crash, dovecot failed to restart with this in the system log...
Feb 4 10:04:29 G520X2 launchd: org.dovecot: exited with exit code: 89 Feb 4 10:04:29 G520X2 launchd: org.dovecot: respawning too quickly! throttling Feb 4 10:04:29 G520X2 launchd: org.dovecot: 7 more failures without living at least 60 seconds will cause job removal Feb 4 10:04:29 G520X2 launchd: org.dovecot: will restart in 10 seconds Feb 4 10:04:39 G520X2 launchd: org.dovecot: exited with exit code: 89 Feb 4 10:04:39 G520X2 launchd: org.dovecot: respawning too quickly! throttling Feb 4 10:04:39 G520X2 launchd: org.dovecot: 6 more failures without living at least 60 seconds will cause job removal Feb 4 10:04:39 G520X2 launchd: org.dovecot: will restart in 10 seconds Feb 4 10:04:49 G520X2 launchd: org.dovecot: exited with exit code: 89 Feb 4 10:04:49 G520X2 launchd: org.dovecot: respawning too quickly! throttling Feb 4 10:04:49 G520X2 launchd: org.dovecot: 5 more failures without living at least 60 seconds will cause job removal Feb 4 10:04:49 G520X2 launchd: org.dovecot: will restart in 10 seconds
The problem turned out to be an old master.pid file (/usr/local/var/run/dovecot/master.pid) that was left over from the crash.
Deleting the file allowed dovecot to restart.
Actually, dovecot told me what the problem was when I attempted to start it from the command line as opposed to starting it with the LaunchDaemon...
G520X2:root# /usr/local/sbin/dovecot -F Fatal: Dovecot is already running with PID 59 (read from /usr/local/var/run/dovecot/master.pid)
Hope it helps someone else.
B. Bodger
Init files should have some code to check if a pid is left behind. That way this won't happen. If a pid points to a non-existent process, or the process isn't what it expects, it deletes the pidfile, otherwise it skips starting.
-- MailScanner is like deodorant... You hope everybody uses it, and you notice quickly if they don't!!!!