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 2038403

Summary: SSH login fails with "client_loop: send disconnect: Broken pipe"
Product: Red Hat Enterprise Linux 9 Reporter: Neal Gompa <ngompa13>
Component: opensshAssignee: Dmitry Belyavskiy <dbelyavs>
Status: CLOSED NOTABUG QA Contact: Marek Havrila <mhavrila>
Severity: low Docs Contact:
Priority: low    
Version: CentOS StreamCC: bstinson, carl, davdunc, davide, davidmccheyne, daxelrod, fedora, jjelen, jwboyer, matt, mhavrila, michel
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-31 13:15:47 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:

Description Neal Gompa 2022-01-07 20:28:47 UTC
Description of problem:
On my self-built cloud images, attempts to login to booted VMs fail with the error "client_loop: send disconnect: Broken pipe".

This last worked on an image I built on November 24, 2021. Images I've built this week have this problem. The compose "CentOS-Stream-9-20211222.0" is the compose where this problem is exhibited.

Version-Release number of selected component (if applicable):
8.7p1-5.el9

How reproducible:
Always

Steps to Reproduce:
1. git clone https://gitlab.com/Conan_Kudo/kiwi-cloud-imagebuild-test
2. sudo podman run --privileged --rm -it -v $PWD/kiwi-cloud-imagebuild-test:/code:z --workdir /code registry.fedoraproject.org:34 /bin/bash
3. dnf --assumeyes install kiwi-cli
4. ./kiwi-build --image-type=oem --image-profile=OpenStack --image-name=centos9 --output-dir $PWD/tmpoutput
5. Boot in OpenStack
6. Try to login to cloud-user (the cloud-init configured user)

Actual results:
SSH login fails with "client_loop: send disconnect: Broken pipe"

Expected results:
SSH login works.

Additional info:
I've got a sample image demonstrating this problem: https://ngompa.fedorapeople.org/centos/CentOS-9-Appliance.x86_64-0.0.0-20220106.qcow2

Comment 1 Jakub Jelen 2022-01-07 20:39:38 UTC
Debug logs would be useful from both client and server.

Unfortunately, we can not support every rebuild. I can just confirm we have dozens tests that verify this particular use cases work with RHEL and CentOS builds we provide so this will most probably be some issue with the rebuild or with the infra.

Comment 2 Neal Gompa 2022-01-18 17:47:25 UTC
(In reply to Jakub Jelen from comment #1)
> Debug logs would be useful from both client and server.
> 
> Unfortunately, we can not support every rebuild. I can just confirm we have
> dozens tests that verify this particular use cases work with RHEL and CentOS
> builds we provide so this will most probably be some issue with the rebuild
> or with the infra.

What would you like logs of? I'm still trying to figure out how to do a workaround login somehow to get logs...

Comment 3 Jakub Jelen 2022-01-24 13:34:51 UTC
ssh client and sshd server one with LogLevel DEBUG3 in ssh_config and sshd_config.

You can probably access the VM through console to get the server logs, if you run it locally. Not sure about the OpenStack though ... but I believe there must be also some console access.

Comment 4 Neal Gompa 2022-01-25 22:49:50 UTC
I figured out the issue. Apparently the SELinux policy wasn't being correctly applied, so "/var/run" was broken and sshd didn't work properly.

I fixed it in kiwi: https://github.com/OSInside/kiwi/pull/2046

You may want to make sure your image building tools are doing this properly too, as it was subtle and difficult to pin down.