Pekka Savola píše v Po 04. 08. 2008 v 12:40 +0300: > On Mon, 4 Aug 2008, Timo Sirainen wrote: > >> It doesn't seem to be that the current logic is working; there is no > >> program with the PID that's in master.pid, and dovecot (1.0.7 + RHEL > >> patches) refuses to start. > >> > >> root: /root$ /sbin/service dovecot start > >> Starting Dovecot Imap: Error: Dovecot is already running with PID 2746 > >> (read from /var/run/dovecot/master.pid) > >> Fatal: Invalid configuration in /etc/dovecot.conf > >> [FAILED] > >> root: /root$ more /var/run/dovecot/master.pid > >> 2746 > >> root: /root$ ps auxw | grep 2746 > >> root 31714 0.0 0.1 4116 584 pts/1 R+ 20:19 0:00 grep 2746 > > > > SELinux perhaps? It checks this by kill()ing the process and seeing if it > > returns ESRCH. If not, it assumes the process exists. If you've SELinux > > perhaps it always return EPERM to the call.. > > 'getenforce' says disabled, so no. This is pretty strange -- I looked > at the code and basically duplicated the logic there and could not > reproduce this problem with a smaller piece of code. And it doesn't > seem to appear always in any case -- I killed dovecot with KILL signal > (leaving the PID file behind), and after that it started up without > problems. Unless you have other ideas what to look for, I guess this > will remain a mystery.. >
There is a not-so-prefect init script installed for dovecot in RHEL, try using the one from Fedora (http://cvs.fedoraproject.org/viewcvs/rpms/dovecot/devel/dovecot.init?rev=1.6&view=auto). A new init script will be added in RHEL 5.3. Dan -- Fedora and Red Hat package maintainer