Bug 843116
Summary: | dovecot starts too early | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Ralf Corsepius <rc040203> |
Component: | dovecot | Assignee: | Michal Hlavinka <mhlavink> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 17 | CC: | janfrode, mhlavink |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | dovecot-2.1.10-2.fc17 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-11-15 02:38:50 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 851131 | ||
Bug Blocks: |
Description
Ralf Corsepius
2012-07-25 16:02:59 UTC
please try if following helps: create /etc/systemd/system/dovecot.service with content: .include /usr/lib/systemd/system/dovecot.service [Unit] After=autofs.service and reboot. Does it help? (In reply to comment #1) > Does it help? No, it doesn't. # cat /etc/systemd/system/dovecot.service .include /usr/lib/systemd/system/dovecot.service [Unit] After=autofs.service After rebooting, user "corsepiu" logging-in into xfce via gdm and launching thunderbird: # systemctl status dovecot.service dovecot.service - Dovecot IMAP/POP3 email server Loaded: loaded (/etc/systemd/system/dovecot.service; enabled) Active: active (running) since Fri, 27 Jul 2012 16:32:19 +0200; 5min ago Main PID: 834 (dovecot) CGroup: name=systemd:/system/dovecot.service ├ 834 /usr/sbin/dovecot -F ├ 868 dovecot/anvil └ 869 dovecot/log Jul 27 16:32:19 beck dovecot[834]: master: Dovecot v2.1.8 starting up (core...d) Jul 27 16:32:19 beck dovecot[834]: master: Warning: /run/user/corsepiu/gvfs...nt Jul 27 16:32:45 beck dovecot[869]: imap-login: Login: user=<corsepiu>, meth...o> Jul 27 16:32:45 beck dovecot[869]: imap(corsepiu): Error: chdir(/users/cors...ks Jul 27 16:32:45 beck dovecot[869]: imap(corsepiu): Error: user corsepiu: In...iu Jul 27 16:32:45 beck dovecot[869]: imap(corsepiu): Error: Invalid user sett...n. OK, I tried to reproduce this. Environment: mkdir /home/auto adduser -d /home/auto/afsuser afsuser passwd afsuser new /etc/auto.home with following line: afsuser -fstype=ext3,loop,rw :/home/disk.img added "/home/auto /etc/auto.home" to /etc/auto.master chkconfig dovecot on chkconfig autofs on dd if=/dev/zero of=/home/disk.img bs=1M count=100 mkfs.ext3 -F /home/disk.img mount /home/disk.img /mnt -oloop mv /home/auto/afsuser /mnt umount /mnt default dovecot configuration, set mail_location=maildir:~/Maildir configure thunderbird to use afsuser@localhost:143 1) Reproduce - force autofs started *after* (note "Before=") dovecot: # cat /etc/systemd/system/dovecot.service .include /usr/lib/systemd/system/dovecot.service [Unit] Before=autofs.service reboot, add enforcing=0 to kernel cmd line start thunderbird -> "Login to server localhost failed." service dovecot status: master: Dovecot v2.1.9 starting up (core dumps disabled) master: Warning: /misc is no longer mounted. See http://wiki2.dovecot.org/Mountpoints master: Warning: /net is no longer mounted. See http://wiki2.dovecot.org/Mountpoints master: Warning: /home/auto is no longer mounted. See http://wiki2.dovecot.org/Mountpoints imap-login: Login: user=<afsuser>, method=PLAIN, rip=::1, lip=::1, mpid=884, secured, session=<u5QeJdzHfAAAAAAAAAAAAAAAAAAAAAAB> imap(afsuser): Error: user afsuser: Initialization failed: Namespace '': Can't create mailbox root dir /home/auto/afsuser/...ount remove imap(afsuser): Error: Invalid user settings. Refer to server log for more information. -> reproducible 2) Try the fix - start dovecot after autofs: # cat /etc/systemd/system/dovecot.service .include /usr/lib/systemd/system/dovecot.service [Unit] After=autofs.service reboot cat /var/log/boot.log: Starting Automounts filesystems on demand... ......... [ OK ] Started Automounts filesystems on demand. Starting Dovecot IMAP/POP3 email server... [ OK ] Started Dovecot IMAP/POP3 email server. so dovecot really is started after autofs thunderbird -> Login failed again service dovecot status: dovecot: master: Dovecot v2.1.9 starting up (core dumps disabled) dovecot: imap-login: Login: user=<afsuser>, method=PLAIN, ... dovecot: imap(afsuser): Error: chdir(/home/auto/afsuser) failed: Too many levels of symbolic links WTF? # cat chdircheck.c #include <unistd.h> #include <stdio.h> #include <errno.h> int main(int argc, char **argv) { int r=chdir("/home/auto/afsuser"); fprintf(stderr,"Return code is: %d, errno=%d : %m\n",r,errno); return r; } gcc chdircheck.c -o /home/chdircheck to /etc/.../dovecot.service added: [Service] ExecStartPre=/home/chdircheck reboot service dovecot status: failed /var/log/messages: chdircheck[608]: Return code is: -1, errno=40 : Too many levels of symbolic links seems there is some problem with autofs. I'll investigate and file a new bug. > seems there is some problem with autofs. I'll investigate and file a new bug. the bug seems to be in systemd or kernel : bug #851131 That systemd bug won't be fixed in Fedora 17 nor 16, but there should be workaround for that bug. please try if following helps: create /etc/systemd/system/dovecot.service with content: .include /usr/lib/systemd/system/dovecot.service [Unit] After=autofs.service [Service] PrivateTmp=false and reboot. Does it help? (In reply to comment #5) > That systemd bug won't be fixed in Fedora 17 nor 16, Is anybody surprized, why Fedora is loosing users? I regret, but such kind of regressions, definitely contribute their share to the "great Fedora experience". > but there should be > workaround for that bug. ... > please try if following helps: > create /etc/systemd/system/dovecot.service with content: ... > and reboot. Does it help? Seems so. At least, dovecot appeared working properly after 2 reboots for me. Thanks for you efforts. Should be fixed in dovecot-2.1.10-2.fc17 I did not use 'After=autofs.service', because for my testing it was not necessary. Only the systemd workaround was required. dovecot-2.1.10-2.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/dovecot-2.1.10-2.fc17 Package dovecot-2.1.10-2.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing dovecot-2.1.10-2.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-17584/dovecot-2.1.10-2.fc17 then log in and leave karma (feedback). dovecot-2.1.10-2.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report. |