Bug 1568457 - ssh closing and resetting connections
Summary: ssh closing and resetting connections
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: openssh
Version: 7.4-Alt
Hardware: ppc64le
OS: Linux
unspecified
urgent
Target Milestone: rc
: ---
Assignee: Jakub Jelen
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-17 14:29 UTC by Monty Poppe
Modified: 2019-10-02 20:28 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-17 22:20:45 UTC
Target Upstream Version:


Attachments (Terms of Use)
ssh troubleshooting session output (367.96 KB, text/plain)
2018-04-17 14:29 UTC, Monty Poppe
no flags Details


Links
System ID Private Priority Status Summary Last Updated
IBM Linux Technology Center 166829 0 None None None 2018-04-17 14:58:09 UTC

Description Monty Poppe 2018-04-17 14:29:19 UTC
Created attachment 1423064 [details]
ssh troubleshooting session output

Description of problem:
We are expriencing SSH issues on the ESS storage cluster at LLNL during scaling test of the ESS.  What we are seeing is that when commands/scripts that operate on multiple nodes will error out with either:

ssh_exchange_identification: Connection closed by remote host

or

ssh_exchange_identification: read: Connection reset by peer

They occur on different systems each time, so we know it is not host related.

These errors are easily reproducible and even occur when fanout is set to a low number (16 in this example):

date; time xdsh gss_ppc64 -f 16 ssh -v sierra4459 hostname

Version-Release number of selected component (if applicable):
[root@sierra4459:~]# ssh -V  
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017

[root@sierra4459:~]# rpm -qa | grep ssh
pdsh-rcmd-ssh-2.33-2.ch6.ppc64le
openssh-7.4p1-13.el7_4.ppc64le
openssh-server-7.4p1-13.el7_4.ppc64le
libssh2-1.4.3-10.el7_2.1.ppc64le
openssh-clients-7.4p1-13.el7_4.ppc64le

[root@sierra4459:~]# rpm -qa --last | grep -i openssh
openssh-server-7.4p1-13.el7_4.ppc64le         Fri Dec  1 15:25:41 2017
openssh-clients-7.4p1-13.el7_4.ppc64le        Fri Dec  1 15:20:47 2017
openssh-7.4p1-13.el7_4.ppc64le                Fri Dec  1 15:20:47 2017

How reproducible:
every time

Steps to Reproduce:
1. xdsh gss_ppc64 -f 16 ssh -v sierra4459 hostname


Actual results:
sample errors:
sierra4329: ssh_exchange_identification: read: Connection reset by peer

sierra4330: ssh_exchange_identification: Connection closed by remote host

Expected results:
no closes or resets.

Additional info:
Additional debug output attached.

Comment 2 Monty Poppe 2018-04-17 14:33:16 UTC
An additional detail I forgot to add: We experience the same issue over both high-speed network and management network.

Comment 3 Monty Poppe 2018-04-17 14:39:07 UTC
We at first found that sshd_config had been overwritten on December 20th, with two additional parameters added (KeyRegenerationInterval 0 and MaxStartups 1024). I saw on my GA ESS config that these parameters were not set, so we removed them and restarted sshd on all ionodes and the ems but we still encountered the closed connections and peer resets - and we additionally saw Host Key Authentication errors.  We returned them to their original state and the Host Key Authentication errors went away, but the ssh issue still remains of course.

Comment 4 Jakub Jelen 2018-04-17 16:26:54 UTC
This sounds like an issue of the opening too many connection to single host. The default configuration of MaxStartups is 10:30:60, which means that after 10 in-authentication processes, the others are randomly dropped. This is not a bug, but a feature.

The server logs can probably confirm this theory, but you need to run it at least with "LogLevel VERBOSE" in sshd_config.

If you set this configuration option to MaxStartups 1024, you should no longer see this issue. The KeyRegenerationInterval is unrelated.

Also make sure the sshd services are restarted after configuration changes. Please, provide logs from server and ideally also from client to really see what is going on there.

Comment 5 Monty Poppe 2018-04-17 22:20:45 UTC
Thank you that resolved the problem.

Comment 6 Arul Dhandapani 2019-10-02 20:28:44 UTC
MaxStartups 1024 configuration changes in sshd_config resolved to support more than 10 thread.


Note You need to log in before you can comment on or make changes to this bug.