Re: Cyrus-imapd fails to bind on reboot when assigned to listen on specific IP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Sat, Mar 20, 2021 at 08:48:45AM -0500, Nic Bernstein wrote:
>
>> > I can put Afteretwork-online.target in the service description, but
>> > seems odd that I have to... any other suggestions?
>> >
>>
>> You've got the correct answer right there; "Afteretwork-online.target". 
>> When you don't specify a bind address, cyrus uses 0.0.0.0, initially
>> getting
>> just 127.0.0.1.  As any new interfaces come online, it will bind to
>> them. 
>> But if you give it a specific IP, and that IP isn't available, cyrus
>> exits.
>> Had you also given it 127.0.0.1, that might have worked, but I've not
>> tried
>> it.
>>
>> FWIW, my Debian-based service  unit has this: After=local-fs.target
>> network.target
>> which seems correct to me.
>
> No, network.target does not really guarantee anything during startup.
> network.target is useful mostly via shutdown, to ensure networked
> services are stopped before the network is brought down.
>
> network-online.target is also not necessarily enough, because it is not
> well defined what does "online" mean. E.g., _IF_ you use NetworkManager,
> _and_ you've configured the proper connection with "may-fail: no", _and_
> the connection comes up before NetworkManager-wait-online.service would
> time out, _then_ Afteretwork-online.target will do what you want. But
> if any of the above conditions are not true, then you may still get the
> same error. Of course, you may write your own systemd unit which comes
> before network-online.target, and then you can freely define what does
> "the network is online" mean for your specific setup.
>
> The only robust solution which would not depend on anything outside of
> Cyrus would be making "master" listen on netlink for interface events,
> and open the listening socket only when the reqired IP address becomes
> available.
>
> Regards,
> Gabor
>

I thought such things were exactly what systemd should fix, because some
older init systems were said to be lacking such functionality.
Unfortunately systemd is not good enough to fix such issues and support
forums are full of similar questions with no satisfying solutions :)

Regards,
Simon


------------------------------------------
Cyrus: Info
Permalink: https://cyrus.topicbox.com/groups/info/Te727080483918be4-M851ed5d8fa55d95f1b8703b4
Delivery options: https://cyrus.topicbox.com/groups/info/subscription




[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux