Bug 986045 - dovecot imap sometimes fails to start because another service has taken the IMAPS port
dovecot imap sometimes fails to start because another service has taken the I...
Status: CLOSED DUPLICATE of bug 723228
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: dovecot (Show other bugs)
6.4
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Michal Hlavinka
qe-baseos-daemons
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-18 16:45 EDT by Ben Webb
Modified: 2013-08-14 07:08 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-14 07:08:02 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ben Webb 2013-07-18 16:45:20 EDT
Description of problem:
dovecot starts up pretty late in the boot process (S65 in runlevel 3). So sometimes another service that binds to a random port (NFS in our case) starts up before it, and binds to a port that dovecot wants to use. Consequently, dovecot will not start.

Version-Release number of selected component (if applicable):
dovecot-2.0.9-5.el6.x86_64

How reproducible:
Some (small) fraction of the time.

Steps to Reproduce:
1. Install dovecot and configure it to listen on the imaps port.
2. Start up the system.

Actual results:
Sometimes another process will bind to port 993 before dovecot and so it won't start up. Trying to start it manually also won't work:
# /sbin/service dovecot start
Starting Dovecot Imap: Error: service(imap-login): listen(*, 993) failed: Address already in use
Fatal: Failed to start listeners
                                                           [FAILED]

(I guess you could force this to happen 100% of the time by pinning one of the NFS daemons to port 993 by modifying /etc/sysconfig/nfs.)


Expected results:
dovecot starts normally.


Additional info:
A fix that works for me: use portreserve, i.e.

echo "993" > /etc/portreserve/imaps

Add to /etc/init.d/dovecot in the start() function:
     [ -x /sbin/portrelease ] && /sbin/portrelease imaps &>/dev/null || :
Comment 1 Michal Hlavinka 2013-08-14 07:08:02 EDT
This was already reported. Closing as duplicate.
Unfortunately, the original bug is private, so you won't be able to see it.

*** This bug has been marked as a duplicate of bug 723228 ***

Note You need to log in before you can comment on or make changes to this bug.