Bug 3823 - 2_a2: systemd[1]: Failed to read PID file /var/run/dovecot after start
Summary: 2_a2: systemd[1]: Failed to read PID file /var/run/dovecot after start
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal major
Target Milestone: ---
Assignee: Samuel Verschelde
QA Contact:
URL:
Whiteboard:
Keywords: Triaged
Depends on:
Blocks: 2120
  Show dependency treegraph
 
Reported: 2011-12-20 02:15 CET by Bit Twister
Modified: 2012-02-26 12:13 CET (History)
2 users (show)

See Also:
Source RPM: systemd-43-1.mga2.src.rpm
CVE:
Status comment:


Attachments

Description Bit Twister 2011-12-20 02:15:35 CET
Description of problem:

systemd[1]: Failed to read PID file /var/run/dovecot after start. The service might be broken.

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


How reproducible: Always


Steps to Reproduce:
1. urpmi dovecot
2. reboot
3. grep dovecot /var/log/messages

You should see something like the following: snippet
: Starting IMAP daemon (dovecot): If you have trouble with authentication failures,
: enable auth_debug setting. See http://wiki.dovecot.org/WhyDoesItNotWork
: This message goes away after the first successful login.
Dec 19 19:03:39 localhost dovecot[2709]: [  OK  ]
Dec 19 19:03:39 localhost systemd[1]: Failed to read PID file /var/run/dovecot after start. The service might be broken.

ll /var/run/dovecot/master.pid
-rw------- 1 root root 5 Dec 19 19:03 /var/run/dovecot/master.pid



Temporary workaround in /etc/init.d/dovecot
change # pidfile: /var/run/dovecot
to     # pidfile: /var/run/dovecot/master.pid

That workaround is not required in Mandriva 2011.0
Comment 1 Manuel Hiebel 2011-12-20 22:34:12 CET
Hi, thanks for reporting this bug, iirc it's more an issue in dovecot.
Assigned to the package maintainer. (or a padawan, I don't know)

(Please set the status to 'assigned' if you are working on it)

Keywords: (none) => Triaged
Assignee: bugsquad => stormi
Source RPM: systemd-37-17.mga2.src.rpm => dovecot

Comment 2 Bit Twister 2011-12-20 23:13:07 CET
(In reply to comment #1)
> Hi, thanks for reporting this bug, iirc it's more an issue in dovecot.

You might be right, but source packages appear to be the same as Mandriva's
Source rpm: dovecot-1.2.17-1.mga2.src.rpm
Source rpm: dovecot-1.2.17-1.src.rpm

both installs have a /var/run/dovecot/master.pid after startup.
Comment 3 D Morgan 2011-12-20 23:41:33 CET
Just fixed on svn. Please test next dovecot rpm.

Status: NEW => RESOLVED
CC: (none) => dmorganec
Resolution: (none) => FIXED

Comment 4 Bit Twister 2011-12-21 09:14:28 CET
Dec 21 01:57:57 localhost perl: [RPM] dovecot-1.2.17-2.mga2.x86_64 installed
Dec 21 01:58:00 localhost perl: [RPM] dovecot-1.2.17-1.mga2.x86_64 removed

# shutdown -r now

Dec 21 02:03:33 localhost systemd[1]: Failed to read PID file /var/run/dovecot after start.


Test procedure is really hard:

urpmi dovecot
service dovecot restart
grep dovecot /var/log/messages

Status: RESOLVED => REOPENED
Resolution: FIXED => (none)

Comment 5 Bit Twister 2012-01-28 17:41:06 CET
(In reply to comment #3)
> Just fixed on svn. Please test next dovecot rpm.

Still broke.
      Install rpm: dovecot-1.2.17-2.mga2
      Source rpm: dovecot-1.2.17-2.mga2.src.rpm


dovecot needs a /lib/systemd/system/dovecot.service file.
If it does not exist, will delay system boot completion for 5 minutes or more.

Suggested /lib/systemd/system/dovecot.service follows:
[Unit]
Description=Dovecot IMAP/POP3 email server
After=local-fs.target network.target

[Service]
Type=simple
ExecStart=/usr/sbin/dovecot -F
NonBlocking=yes

[Install]
WantedBy=multi-user.target
Comment 6 Bit Twister 2012-02-22 18:05:20 CET
clean beta1 install does not have the problem.

Status: REOPENED => RESOLVED
Resolution: (none) => FIXED

Comment 7 Bit Twister 2012-02-24 10:12:54 CET
No idea what happened. I even removed/installed it again and still broke.


Feb 24 02:56:13 wb2 dovecot[2898]: 
Starting IMAP daemon (dovecot): If you have trouble with authentication failures,
: enable auth_debug setting. See http://wiki.dovecot.org/WhyDoesItNotWork
: This message goes away after the first successful login.
Feb 24 02:56:13 wb2 dovecot[2898]dovecot[2898]: [  OK  ]
Feb 24 02:56:13 wb2 systemd[1]: PID file /var/run/dovecot not readable (yet?) after start.
Feb 24 03:01:13 wb2 systemd[1]: dovecot.service operation timed out. Terminating.
systemd[1]: Unit dovecot.service entered failed state.

# ll /var/run/dovecot
total 8
srw------- 1 root root       0 Feb 24 02:56 auth-worker.2952
srwxrwxrwx 1 root root       0 Feb 24 02:56 dict-server
lrwxrwxrwx 1 root root      17 Feb 24 02:56 dovecot.conf -> /etc/dovecot.conf
drwxr-x--- 2 root dovecot 4096 Feb 24 02:56 login
-rw------- 1 root root       5 Feb 24 02:56 master.pid

Severity: normal => major
Status: RESOLVED => REOPENED
Resolution: FIXED => (none)

Bit Twister 2012-02-24 10:14:44 CET

Blocks: (none) => 2120
Source RPM: dovecot => systemd-40-3.mga2.src.rpm

Bit Twister 2012-02-24 13:26:58 CET

Source RPM: systemd-40-3.mga2.src.rpm => systemd-43-1.mga2.src.rpm

Comment 8 Colin Guthrie 2012-02-26 12:13:02 CET
This problem is simply that the pidfile: header of the LSB initscript contains bogus details.

It states:
# pidfile: /var/run/dovecot

But when dovecot is started it writes it's pid to:
/var/run/dovecot/master.pid

Changing the LSB script is trivial and should avoid this problem.

I've pushed an updated package and it seems to start/stop fine here without any delay.

CC: (none) => mageia
Status: REOPENED => RESOLVED
Resolution: (none) => FIXED


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