Unable to start dovecot

Print Friendly, PDF & Email

I recently ran into the problem on one of our production servers where I was unable to start dovecot. I used the normal syntax:

[root@techedemic]# /etc/init.d/dovecot stop
Stopping Dovecot Imap:                       [FAILED]  
[root@techedemic]# /etc/init.d/dovecot start
Stopping Dovecot Imap:                       [OK]

All seems fine, right? Wrong! When I did a ps awux | grep dovecot, the process was not running. Doing the ‘stop’ mentioned above also ‘failed’ again. So why was Dovecot not starting?

I did the following

[root@techedemic]# /etc/init.d/dovecot status
dovecot dead but subsys locked

So this meant the easy solution was just to remove the subsys file, start again and everything should be fine? Well, yes, that could be the right option (and in some cases it is, see this link for more info).

In my case though, it was simply that the /var partition on my system was out of space. My /var/log/kernel.log file was 7.4GB in size. This was because of some other IO and Journalling tests that was done on the box the day before. It turns out that if dovecot cannot append to it’s logfiles and/or the /var/mail directory cannot be written to, then it will not start.

So I just cleared out the kernel.log file, had ample free space and voilá – it started up (and remained up).

[root@techedemic]# /etc/init.d/dovecot stop
Stopping Dovecot Imap:                       [FAILED]  
[root@techedemic]# /etc/init.d/dovecot start
Stopping Dovecot Imap:                       [OK]  
[root@techedemic]# ps awux | grep dovecot
dovecot   2782  0.0  0.0  33884  1660 ?        S    07:55   0:00 pop3-login
root      3249  0.0  0.0  61128   756 pts/2    S+   07:55   0:00 grep dovecot
dovecot  23385  0.0  0.0  33884  1656 ?        S    07:44   0:00 pop3-login
dovecot  30141  0.0  0.0  33884  1660 ?        S    07:49   0:00 pop3-login
root     31986  0.0  0.0   6068   532 ?        Ss   07:20   0:00 /usr/sbin/dovecot
root     31987  0.0  0.0  61620  1612 ?        S    07:20   0:00 dovecot-auth

So, if Dovecot, or any other program for that matter fails to start up and you are unable to find the problem, consider looking at the diskspace available to your /var/log directory. It seems it can cause havoc for some programs if you cannot log…which in a way, makes sense.

Hope this helps someone out there..


Share and Enjoy !

0 0

Add a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.