SUPPORT / SAMPLES & SAS NOTES
 

Support

Usage Note 66492: FILENAME FTP(FTP/TLS) fails with "ERROR: The connection was reset by a peer" due to using implicit FTP/TLS

DetailsAboutRate It

If you connect to a FTP/TLS server that is configured to use implicit FTP/TLS, FILENAME FTP/TLS might fail with the following error:

ERROR: The connection was reset by a peer. 

FILENAME FTP (FTP/TLS) supports explicit FTP connections only. 

Note: This error can also be generated due to other system issues. 

Detect Whether Your Site Is Using Implicit FTP

There are several ways to determine whether your site is using implicit FTP.

Port Number

If you are connecting to a FTP/TLS server on Port 990, the FTP/TLS server is most likely configured to use implicit FTP.  Port 990 is typically used for Implicit FTP. Port 21 is typically used for Explicit FTP. 

Debug Parameter

To debug FILENAME FTP issues, add the debug parameter in the FILENAME FTP statement. After coding debug, if you see no additional output such as the following, you are not connecting to the remote FTP/TLS server: 

FILENAME IN FTP …  AUTHTLS  DEBUG;
.......
NOTE: 220-FTP ....

In this scenario, it is possible that the FTP/TLS server is using implicit FTP.

<<220 Debug Output

To see the flow of communication between the FTP client and the remote FTP server, execute the FTP outside of SAS with the -d (debug) parameter​​​​​. Where <<220 ... occurs in the debug results helps you determine whether you are using implicit or explicit FTP:

  • Implicit FTP/TLS connections expect the SSL/TLS handshake BEFORE the initial reply code << 220 ... in the debug output. The SSL/TLS  handshake occurs first, and then the <<220 reply
  • With Explicit FTP/TLS connections, the initial reply code << 220 is expected BEFORE the SSL/TLS handshake occurs. <<220  ... occurs first, and then the AUTH TLS handshake.

There are no plans for SAS to support implicit FTP. 

Note: For details about FILENAME FTP (FTP/TLS) support, see SAS Note 56154, "File Transfer Protocol Secure (FTPS, FTPES, and FTP/TLS) support."



Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemBase SASz/OS9.4_M39.4 TS1M3
z/OS 64-bit9.4_M39.4 TS1M3
Microsoft® Windows® for x649.4_M39.4 TS1M3
Microsoft Windows 8 Enterprise 32-bit9.4_M39.4 TS1M3
Microsoft Windows 8 Enterprise x649.4_M39.4 TS1M3
Microsoft Windows 8 Pro 32-bit9.4_M39.4 TS1M3
Microsoft Windows 8 Pro x649.4_M39.4 TS1M3
Microsoft Windows 8.1 Enterprise 32-bit9.4_M39.4 TS1M3
Microsoft Windows 8.1 Enterprise x649.4_M39.4 TS1M3
Microsoft Windows 8.1 Pro 32-bit9.4_M39.4 TS1M3
Microsoft Windows 8.1 Pro x649.4_M39.4 TS1M3
Microsoft Windows 109.4_M39.4 TS1M3
Microsoft Windows Server 20089.4_M39.4 TS1M3
Microsoft Windows Server 2008 R29.4_M39.4 TS1M3
Microsoft Windows Server 2008 for x649.4_M39.4 TS1M3
Microsoft Windows Server 2012 Datacenter9.4_M39.4 TS1M3
Microsoft Windows Server 2012 R2 Datacenter9.4_M39.4 TS1M3
Microsoft Windows Server 2012 R2 Std9.4_M39.4 TS1M3
Microsoft Windows Server 2012 Std9.4_M39.4 TS1M3
Windows 7 Enterprise 32 bit9.4_M39.4 TS1M3
Windows 7 Enterprise x649.4_M39.4 TS1M3
Windows 7 Home Premium 32 bit9.4_M39.4 TS1M3
Windows 7 Home Premium x649.4_M39.4 TS1M3
Windows 7 Professional 32 bit9.4_M39.4 TS1M3
Windows 7 Professional x649.4_M39.4 TS1M3
Windows 7 Ultimate 32 bit9.4_M39.4 TS1M3
Windows 7 Ultimate x649.4_M39.4 TS1M3
64-bit Enabled AIX9.4_M39.4 TS1M3
64-bit Enabled Solaris9.4_M39.4 TS1M3
HP-UX IPF9.4_M39.4 TS1M3
Linux for x649.4_M39.4 TS1M3
Solaris for x649.4_M39.4 TS1M3
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.