Re: Cyrus-imapd fails to bind on reboot when assigned to listen on specific IP
Nic Bernstein <[email protected]>
| Newsgroups | gmane.mail.imap.cyrus |
|---|---|
| Message-ID | <[email protected]> |
On 3/21/21 1:50 PM, Simon Loader wrote: > On Sun, 21 Mar 2021 at 16:51, Simon Matter <[email protected]> wrote: >>> When I don't specify an IP address, cyrus-imapd starts correctly on a >>> server reboot. >>> >>> When I specify IP / protocol: >>> >>> imap cmd="imapd" listen="192.168.1.230:imap" prefork=5 proto=tcp4 >>> >>> cyrus-imapd tries to bind to those before it is available, and fails: >>> >>> Mar 20 20:53:31 emp87 cyrus/master[973]: unable to bind to imap/ipv4 >>> socket: Cannot assign requested address >>> Mar 20 20:53:31 emp87 cyrus/master[973]: unable to create imap listener >>> socket: Cannot assign requested address >>> >> While thinking about it again, wouldn't it make sense to make master a bit >> more robust so that it tries to start a service if it failed before, as >> part of its maintenance functionality? > Depends if restarting is making things worse it's not always the correct thing > to do. You can change the systemd config to always restart it but this sort of > fix is always because of another underlying problem and not a good sign. > > I'm old and not the biggest systemd fan or biggest knowledge about it. > It is interesting seeing this thread. I can not see why cyrusd would not > depend not network and FS to be up or any email service not depending > on these 2 things working. Simon L., While I'm sure Simon M. can speak for himself, I'll pipe up here. I believe what he was saying is that 'master,' now known as 'cyrmaster,' the Cyrus super-daemon, should periodically try to restart any listener sockets called for in the SERVICE section of cyrus.conf if which fails to start in the beginning (assuming 'prefork' > 0). I wholeheartedly agree with this idea. Simon M., Are you submitting a feature request to the Cyrus team for this? If not, I'll be happy to do so. It's a capital suggestion. Cheers, -nic -- Nic Bernstein [email protected] https://www.nicbernstein.com https://www.linkedin.com/in/nic-b-26577a178/ ------------------------------------------ Cyrus: Info Permalink: https://cyrus.topicbox.com/groups/info/Te727080483918be4-Mb35886c74c57fcd051741eb5 Delivery options: https://cyrus.topicbox.com/groups/info/subscription