IBM Support

Results Export using SCP Fails with Error: lost connection; RESULT=connection refused

Troubleshooting


Problem

You are transferring exports using SCP (e.g. audit results, datamarts) to a Linux host and they fail.  There are errors in the guard_filetransfer_log similar to: 

15965 Thu Aug 29 06:30:00 2019 guard_filetransfer.pl: Starting file transfer.

15965 Thu Aug 29 06:30:00 2019 scp STDOUT> spawn /usr/bin/scp -q -P 22 /var/tmp/MyReport.csv.gz guarduser@host.com:/mypath/reports/

15965 Thu Aug 29 06:30:01 2019 scp STDOUT> lost connection

15965 Thu Aug 29 06:30:01 2019 scp STDOUT> RESULT=connection refused

15965 Thu Aug 29 06:30:01 2019 SCP to: host.com, User: guarduser, Path: /mypath/reports/, File: /var/tmp/MyReport.csv.gz

15965 Thu Aug 29 06:30:01 2019 Error code: 1

15965 Thu Aug 29 06:30:01 2019 transfer to primary and secondary host failed or there is only primary and transfer to it failed


Many exports are scheduled around the same time from multiple appliances to the same remote host. 

Cause

The remote host is configured to receive a maximum amount of connections that sshd can handle.  This limit is too low for the number of appliances that are concurrently sending data. 

Diagnosing The Problem

With verbose logging for the SCP command, this error is seen right before the "lost connection":
scp STDOUT> ssh_exchange_identification: Connection closed by remote host 

Retrying the export works.  You can see in the guard_filetransfer_log that an export previously failed, was retried, and then it succeeded.

Run this on the remote server to see how many connections sshd can handle:
sudo grep MaxStartups /etc/ssh/sshd_config
 

Resolving The Problem

There are two ways to resolve this:

1. Reschedule the exports staggering the times.

2. Increase the MaxStartups parameter on the remote host.  

Document Location

Worldwide

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSMPHH","label":"IBM Security Guardium"},"Component":"","Platform":[{"code":"PF016","label":"Linux"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB24","label":"Security Software"}}]

Document Information

Modified date:
11 November 2019

UID

ibm11079091