Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1941255

Summary: Specifying bind IP in /etc/cyrus.conf results in cyrus-imapd failing to bind *at all* on reboot
Product: Red Hat Enterprise Linux 8 Reporter: Simon Wilson <simon>
Component: cyrus-imapdAssignee: Martin Osvald 🛹 <mosvald>
Status: CLOSED ERRATA QA Contact: František Hrdina <fhrdina>
Severity: low Docs Contact:
Priority: low    
Version: 8.3CC: fhrdina
Target Milestone: rcKeywords: AutoVerified, EasyFix, Patch, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: cyrus-imapd-3.0.7-24.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 1957608 (view as bug list) Environment:
Last Closed: 2022-11-08 10:02:14 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:    
Bug Blocks: 1957608    

Description Simon Wilson 2021-03-21 06:31:17 UTC
Description of problem:

When specifying an IP address for cyrus to bind to in cyrus.conf, the cyrus systemd file attempts to load cyrus-imapd before the IP address is available, and the binds fail - leaving cyrus-imapd in a useless (but running) state.

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

How reproducible:
Add a specific IP into one of the SERVICES in /etc/cyrus.conf; reboot. Cyrus fails to come up on reboot.

Steps to Reproduce:
1. In cyrus.conf add a specified IP: (e.g.) imap   cmd="imapd"   listen="192.168.1.230:imap"  prefork=5  proto=tcp4
2. systemctl enable cyrus-imapd
3. reboot

Actual results:
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

Expected results:
If a bind IP address is specified the system should not load cyrus-imapd until the IP address is available - depend on network-online.target not network.target?

Additional info:
Adding "network-online.target" in /usr/lib/systemd/system/cyrus-imapd.service [Unit] 'After' section resolves the issue for me, although I assume this would slow down boot on systems without a specified IP for binding to.

NetworkManager is active, IP address is statically assigned.
[root@emp87 ~]# nmcli connection show
NAME    UUID                                  TYPE      DEVICE
enp1s0  99bd7bb3-0ce0-4d97-a66c-8b44dc84c287  ethernet  enp1s0

[root@emp87 ~]# systemctl status network-online.target
● network-online.target - Network is Online
   Loaded: loaded (/usr/lib/systemd/system/network-online.target; static; vendor preset: disabled)
   Active: active since Sun 2021-03-21 01:38:16 AEST; 14h ago
     Docs: man:systemd.special(7)
           https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget

Mar 21 01:38:16 emp87.simonandkate.lan systemd[1]: Reached target Network is Online.

Unlike https://bugzilla.redhat.com/show_bug.cgi?id=1856263 this one is resolved by network-online.target.

Comment 1 Pavel Zhukov 2021-03-23 10:36:03 UTC
Thank you for taking the time to report this issue to us. We appreciate the feedback and use reports such as this one to guide our efforts at improving our products. That being said, this bug tracking system is not a mechanism for requesting support, and we are not able to guarantee the timeliness or suitability of a resolution.

If this issue is critical or in any way time sensitive, please raise a ticket through the regular Red Hat support channels to ensure it receives the proper attention and prioritization to assure a timely resolution.

For information on how to contact the Red Hat production support team, please visit:
    https://access.redhat.com/support

Comment 3 Pavel Zhukov 2021-05-06 07:53:29 UTC
(In reply to Simon Wilson from comment #0)
> Description of problem:
> 
> When specifying an IP address for cyrus to bind to in cyrus.conf, the cyrus
> systemd file attempts to load cyrus-imapd before the IP address is
> available, and the binds fail - leaving cyrus-imapd in a useless (but
> running) state.
> 
> Version-Release number of selected component (if applicable):
> 3.0.7
> 
> How reproducible:
> Add a specific IP into one of the SERVICES in /etc/cyrus.conf; reboot. Cyrus
> fails to come up on reboot.
> 
> Steps to Reproduce:
> 1. In cyrus.conf add a specified IP: (e.g.) imap   cmd="imapd"  
> listen="192.168.1.230:imap"  prefork=5  proto=tcp4
> 2. systemctl enable cyrus-imapd
> 3. reboot
> 
> Actual results:
> 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
> 
> Expected results:
> If a bind IP address is specified the system should not load cyrus-imapd
> until the IP address is available - depend on network-online.target not
> network.target?
> 
> Additional info:
> Adding "network-online.target" in
> /usr/lib/systemd/system/cyrus-imapd.service [Unit] 'After' section resolves
> the issue for me, although I assume this would slow down boot on systems
> without a specified IP for binding to.
> 
> NetworkManager is active, IP address is statically assigned.
> [root@emp87 ~]# nmcli connection show
> NAME    UUID                                  TYPE      DEVICE
> enp1s0  99bd7bb3-0ce0-4d97-a66c-8b44dc84c287  ethernet  enp1s0
> 
> [root@emp87 ~]# systemctl status network-online.target
> ● network-online.target - Network is Online
>    Loaded: loaded (/usr/lib/systemd/system/network-online.target; static;
> vendor preset: disabled)
>    Active: active since Sun 2021-03-21 01:38:16 AEST; 14h ago
>      Docs: man:systemd.special(7)
>            https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget
> 
> Mar 21 01:38:16 emp87.simonandkate.lan systemd[1]: Reached target Network is
> Online.
> 
> Unlike https://bugzilla.redhat.com/show_bug.cgi?id=1856263 this one is
> resolved by network-online.target.

Hello, 

thank you for the bug report and suggested fix. I'd like to recommend to not modify service file provided by the package but create one under /etc/systemd/system . it'll not be overwritten by package update in that case. See https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/chap-managing_services_with_systemd#sect-Managing_Services_with_systemd-Unit_File_Modify for more details

Comment 16 errata-xmlrpc 2022-11-08 10:02:14 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (cyrus-imapd bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:7651