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.
DescriptionSteffen Froemer
2021-02-05 08:07:11 UTC
This bug was initially created as a copy of Bug #1352214
I am copying this bug because:
Description of problem:
systemd sometimes may start openssh before the network interfaces are ready. If openssh-server is configured to listen on a specific IP address(s), it will temporarily fail to bind to it.
Version-Release number of selected component (if applicable):
openssh-server-8.0p1-5.el8.x86_64
How reproducible:
Fairly reliably.
Steps to Reproduce:
1. Configure /etc/ssh/sshd_config to listen on a specific IP address
2. Reboot
Actual results:
The output from journalctl -l /usr/sbin/sshd:
-- Reboot --
Jul 02 09:35:38 shorty.email-scan.com sshd[1007]: WARNING: 'UseLogin yes' is not supported in Fedora and may cause several problems.
Jul 02 09:35:38 shorty.email-scan.com sshd[1077]: error: Bind to port 22 on 192.168.0.1 failed: Cannot assign requested address.
Jul 02 09:35:38 shorty.email-scan.com sshd[1077]: fatal: Cannot bind any address.
Jul 02 09:36:20 shorty.email-scan.com sshd[1494]: WARNING: 'UseLogin yes' is not supported in Fedora and may cause several problems.
Jul 02 09:36:20 shorty.email-scan.com sshd[1495]: Server listening on 192.168.0.1 port 22.
sshd, in this case, initially fails to bind on 192.168.0.1
Looks like sshd bails out and exits initially. After 40 seconds systemd starts it again. By this time the network interfaces have come up, and sshd successfully starts.
Expected results:
sshd should get started by systemd only after all network interfaces are configured.
Additional info:
this can be workarounded by using a systemd-dropin
# mkdir -p /etc/systemd/system/sshd.service.d
# cat << EOF > /etc/systemd/system/sshd.service.d/01-sshd-dependency.conf
[Unit]
After=network-online.target sshd-keygen.target
EOF
# systemctl daemon-reload
(In reply to Jakub Jelen from comment #3)
> Its documented in RHEL7 and RHEL8 System administrator guide:
Honestly I wasn't aware of this. As it's documented in a well known format, there is no further need. I'm closing this BZ now.