Description of problem: Hello this problem is in fact similar to bug #16642 for dhcpd. On boot, for some reasons on my PC, it seems the network interface doesn't come up fast enough before dovecot.service is started. This gives the following errors at boot : dovecot[1369]: Error: bind(192.168.108.147, 110) failed: Cannot assign requested address dovecot[1369]: Error: service(pop3-login): listen(192.168.108.147, 110) failed: Cannot assign requested address dovecot[1369]: Error: bind(192.168.108.147, 995) failed: Cannot assign requested address dovecot[1369]: Error: service(pop3-login): listen(192.168.108.147, 995) failed: Cannot assign requested address dovecot[1369]: Error: bind(192.168.108.147, 143) failed: Cannot assign requested address dovecot[1369]: Error: service(imap-login): listen(192.168.108.147, 143) failed: Cannot assign requested address dovecot[1369]: Error: bind(192.168.108.147, 993) failed: Cannot assign requested address dovecot[1369]: Error: service(imap-login): listen(192.168.108.147, 993) failed: Cannot assign requested address dovecot[1369]: Fatal: Failed to start listeners In my case, the solution was to modify /usr/lib/systemd/system/dovecot.service and to change : After=local-fs.target network.target to After=local-fs.target network-online.target After this, dovecot starts successfully on each boot. Maybe others services opening a listen socket at boot should be changed to use network-online.target (apache, spamd, ...) as I think the problem would happen there too depending on how fast the PC boots compared to the time it really takes for the network interfaces to come up and depending on which order those services will be started (in my case, dovecots fails, but spamd starts ok just after) Reproducible: Steps to Reproduce:
Thanks for the report. You're correct on this. Upstream really dropped the ball by changing this (which they shouldn't have) and not communicating it effectively. Even Fedora has yet to fully adapt to this change. You can see in your logs that bind has the same problem, but at least it's able to wait on its own and adapt to the problem. However, I have fixed bind in SVN and the fix will be included in the next (inevitable) security update for it. I have looked at some other services that theoretically seem like they should need to be changed for this too, but in practice haven't found any others that aren't working. Patched packages uploaded for Mageia 5 and Cauldron. Advisory: ----------------------------------------- The dovecot service was not correctly waiting for the network to be up before attempting to start, causing it to fail to start at boot time in some cases. ----------------------------------------- Updated packages in core/updates_testing: ----------------------------------------- dovecot-2.2.13-5.2.mga5 dovecot-pigeonhole-2.2.13-5.2.mga5 dovecot-pigeonhole-devel-2.2.13-5.2.mga5 dovecot-plugins-pgsql-2.2.13-5.2.mga5 dovecot-plugins-mysql-2.2.13-5.2.mga5 dovecot-plugins-ldap-2.2.13-5.2.mga5 dovecot-plugins-gssapi-2.2.13-5.2.mga5 dovecot-plugins-sqlite-2.2.13-5.2.mga5 dovecot-devel-2.2.13-5.2.mga5 from dovecot-2.2.13-5.2.mga5.src.rpm
CC: (none) => luigiwalserAssignee: bugsquad => qa-bugs
Thanks for taking care of this. In fact I never paid too much attention to it before, but I think the problem was already present for dovecot in mageia4 where I remember I sometime needed to start dovecot after a reboot (but as I use it on a machine that's is rarely switched off, I didn't do more research at that time)
This exact issue started with Mageia 5, as the systemd change happened after Mageia 4. I did notice that Fedora also had another patch before this one to try to force dovecot to wait longer to start, so maybe there was an issue with dovecot itself.
MGA-32 on Acer D620 Xfce No installation issues. I could not replicate the boot errors with the oldest rpm's in the repos: dovecot-2.2.13-5.mga5 Anyway, I updated to the 5.2 version and no problems there neither, so OK AFAICS.
CC: (none) => herman.viaeneWhiteboard: (none) => MGA5-32-OK
(In reply to Nicolas Pomarède from comment #0) > Description of problem: > > Hello > > this problem is in fact similar to bug #16642 for dhcpd. > > On boot, for some reasons on my PC, it seems the network interface doesn't > come up fast enough before dovecot.service is started. > > > In my case, the solution was to modify > /usr/lib/systemd/system/dovecot.service and to change : > > After=local-fs.target network.target > to > After=local-fs.target network-online.target > > After this, dovecot starts successfully on each boot. > > Maybe others services opening a listen socket at boot should be changed to > use network-online.target (apache, spamd, ...) Not sure that is a good solution. I have modified my system to use systemd-networkd and disabled network.service and NetworkManager which gets me 20 second faster boot times. Instead of network-online.target I would have to use systemd-networkd-wait-online. If Mageia converts to systemd-networkd some time in the future all those service files would have to be changed again. You might want to look through http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget You might try backing out your change and running systemctl enable NetworkManager-wait-online.service systemctl --system daemon-reload
CC: (none) => bittwister2
No, network-online is a generic target for when the network is up. It doesn't matter which network service implementation you're using. This was the correct change. As long as upstream doesn't do something stupid again, it will remain correct.
Keywords: (none) => validated_updateWhiteboard: MGA5-32-OK => MGA5-32-OK MGA5-64-OK advisoryCC: (none) => davidwhodgins, sysadmin-bugs
I used dovecot-2.2.13-5.2.mga5.i586.rpm from update/testing and this works correctly now, seems good to be pushed to update/main in my case.
An update for this issue has been pushed to Mageia Updates repository. http://advisories.mageia.org/MGAA-2015-0191.html
Status: NEW => RESOLVEDResolution: (none) => FIXED