Bug 523156 - Dovecot fails to start when calling restart in init script
Summary: Dovecot fails to start when calling restart in init script
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: dovecot
Version: 5.3
Hardware: i386
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Michal Hlavinka
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-09-14 09:17 UTC by Martin Steel
Modified: 2013-03-15 15:43 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-15 15:43:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Martin Steel 2009-09-14 09:17:51 UTC
Description of problem:

Restarting Dovecot through the init script sometimes fails to start the dovecot daemon.

There appears to be a similar issue with HUP signals but I'm unable to reproduce to a suitable level to file a bug.

Version-Release number of selected component (if applicable):

Dovecot version: 1.0.7
Redhat version: 5.3

How reproducible:

Intermittent fault, Dovecot doesn't always fail to start on restart.

Steps to Reproduce:
1. Restart dovecot using the init script i.e. /etc/init.d/dovecot restart
2. Repeat if necessary.
  
Actual results:
Dovecot daemon fails to start.
/etc/init.d/dovecot restart

Content of /var/log/dovecot:
dovecot: Sep 14 09:54:27 Warning: Killed with signal 15
dovecot: Sep 14 09:54:27 Info: Dovecot v1.0.7 starting up
dovecot: Sep 14 09:54:27 Error: Auth process died too early - shutting down
dovecot: Sep 14 09:54:27 Error: auth(default): Socket already exists: /var/run/dovecot/auth-master
dovecot: Sep 14 09:54:27 Error: child 3768 (auth) returned error 89

Expected results:
Dovecot daemon to stop and then start.

Expected log contents:
dovecot: Sep 14 09:53:27 Warning: Killed with signal 15
dovecot: Sep 14 09:53:27 Info: Dovecot v1.0.7 starting up
dovecot: Sep 14 09:53:28 Info: auth-worker(default): mysql: Connected to proddb.mediaburst.net (vmail)


Additional info:

Dovecot configuration (from dovecot -n):

# 1.0.7: /etc/dovecot.conf
log_path: /var/log/dovecot
protocols: pop3
listen: *
login_dir: /var/run/dovecot/login
login_executable: /usr/libexec/dovecot/pop3-login
first_valid_uid: 150
last_valid_uid: 150
first_valid_gid: 150
last_valid_gid: 150
mail_location: maildir:/var/vmail/%d/%n/Maildir
mail_executable: /usr/libexec/dovecot/pop3
mail_plugin_dir: /usr/lib/dovecot/pop3
auth default:
  user: vmail
  passdb:
    driver: pam
  passdb:
    driver: sql
    args: /etc/dovecot-mysql.conf
  userdb:
    driver: passwd
  userdb:
    driver: sql
    args: /etc/dovecot-mysql.conf
  socket:
    type: listen
    master:
      path: /var/run/dovecot/auth-master
      mode: 384
      user: vmail
      group: vmail

MySQL authentication file /etc/dovecot-mysql.conf contains:

driver = mysql
connect = host=my_server port=3308 dbname=vmail user=vmail password=my_password
password_query = SELECT password FROM mailbox WHERE username = '%n' AND domain = '%d'
user_query = SELECT '/var/vmail/%d/%n' as home, 'maildir:/var/vmail/%d/%n' as mail, 150 AS uid, 150 AS gid FROM mailbox WHERE username ='%n' AND domain = '%d' AND active ='1'

Comment 1 Michal Hlavinka 2009-10-07 10:25:03 UTC
I'll look at this, but I can't reproduce this.

I've run following command for four hours (approx. 10 000 dovecot's restarts) but everything has worked.

while true; do service dovecot restart >restart.log ; sleep 1 ; service dovecot status >status; grep -q 'is running' <status || break; done

(the 1 sec sleep is there to be sure dovecot has enough time to daemonize, it'd report "dovecot dead but subsys locked" otherwise)

Comment 4 RHEL Program Management 2010-08-09 18:20:48 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 5 RHEL Program Management 2011-01-11 20:22:41 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 6 RHEL Program Management 2011-01-11 22:30:58 UTC
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.

Comment 7 RHEL Program Management 2011-05-31 13:21:08 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 8 RHEL Program Management 2011-09-23 00:11:28 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 9 RHEL Program Management 2012-06-12 01:03:45 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 10 Michal Hlavinka 2013-03-15 15:43:55 UTC
I am sorry, but it is now too late in the RHEL-5 release cycle.
RHEL-5.10 (the next RHEL-5 minor release) is going to be the first
production phase 2 [1] release of RHEL-5. Since phase 2 we'll be
addressing only security and critical issues.
This issue should not exit in RHEL-6, therefore I am closing the bug as
NEXTRELEASE.

[1] https://access.redhat.com/support/policy/updates/errata/


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