We are using WinSCP to connect to an external vendor site. Out of 5 times, it will connect once. It is in-consistent. The platform is AWS / EC2 and the outbound traffic is behind 3 NAT Gateways and Internet Gateway.
The connection always works from on prem or personal laptops.
Are the multiple NAT gateways in AWS causing this connection to work sometimes. Protocol is FTPs and in Passive mode.
. 2021-07-16 14:36:02.421 Data connection opened . 2021-07-16 14:36:02.421 Trying reuse main TLS session ID . 2021-07-16 14:36:02.421 TLS layer changed state from none to connected . 2021-07-16 14:36:02.421 TLS layer changed state from connected to closed . 2021-07-16 14:36:02.421 Data connection closed . 2021-07-16 14:36:02.421 <Empty directory listing> . 2021-07-16 14:36:32.882 Timeout detected. (control connection) . 2021-07-16 14:36:32.882 Could not retrieve directory listing . 2021-07-16 14:36:32.882 Got reply 1004 to the command 2 * 2021-07-16 14:36:32.945 (EFatal) **Lost connection.** * 2021-07-16 14:36:32.945 Timeout detected. (control connection) * 2021-07-16 14:36:32.945 Could not retrieve directory listing * 2021-07-16 14:36:32.945 Error listing directory '/'