LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Dovecot failed to start after reboot (http://www.linuxquestions.org/questions/linux-server-73/dovecot-failed-to-start-after-reboot-869566/)

yoachan 03-19-2011 03:00 AM

Dovecot failed to start after reboot
 
Dear all,

Few days ago we had a server maintenance.
The system was shutdown, we fix the CPU fan, and start the system again.
But somehow when the system starts, our IMAP server - dovecot is not running. It just sit like a rock.
Because the machine had a CPanel/WHM, I tried to restart dovecot using cpanel and got a message:
Code:

imap has failed, please contact the sysadmin (result was "dovecot is not running").
That was not really useful....

when I tried to restart dovecot using command line, I got nothing. really nothing.

Code:

root@machine [~]# /sbin/service dovecot restart
root@machine [~]#

I've been checking /var/log/messages and /var/log/maillog and both give me nothing about dovecot. Not even a single line. Previously I got some log from dovecot to /var/log/maillog

Can anyone tells me how to find out what happens to my IMAP/dovecot? And anyway to make it run again?

I'm using CentOS 5.5 X64 with dovecot 1.2.16

regards,

Yoachan

yoachan 03-19-2011 03:03 AM

I've been doing some digging and found out that update time backward can cause dovecot to crash.
But I've been asking my friend who did the maintenance and he said that he didn't change the time.
I don't know if somehow few minutes shutdown can cause my machine to roll back it's time,
or is not not related to the problem that I'm having -- I really have no idea.

any help appreciated.

regards,

Yoachan

jamrock 03-19-2011 05:32 AM

I have not seen this exact situation. However, I have seen something similar. I am not near a server now so I don't have all the details.

If the server shuts down abnormally Dovecot does not remove the process id (pid) from the master.pid file. This can prevent the application from restarting.

Search for the master.pid file. It should be in one of the dovecot directories. Set the value to 0 (zero) and see if that resolves the issue.

You can also try renaming the master.pid.

The master.pid might be located in /var/run/dovecot/master.pid

Berhanie 03-19-2011 11:30 AM

Quote:

I don't know if somehow few minutes shutdown can cause my machine to roll back it's time,
or is not not related to the problem that I'm having -- I really have no idea.
not a big deal. it probably means that your hardware clock is off. battery? dovecot (among other things)
is sensitive to time adjustments. you just have to arrange for ntp to set the system time before
dovecot starts, or to manually start/restart dovecot after the system time adjustment. really, you
should see about the hwclock, e.g. manually set the time ("hwclock --systohc") and query it
once in a while ("hwclock --show") to see if it's drifting.

also, check out the halt and reboot scripts in init.d/. if it's not on by default,
there should be an option to synch the hardware clock to the system clock at shutdown.

in case you haven't seen it, TimeMovedBackwards is on the wiki.

yoachan 03-20-2011 12:57 AM

@Jamrock:
U r ROCK! Thanks! It works! :D

@Berhanie:
I see... so if the "Time Moved Backwards" thing happens only when dovecot is started and somehow time moved backward.
that explains a lot. :)
Thanks :D

@all:
case closed.
thanks :D


All times are GMT -5. The time now is 05:23 PM.