[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FTPAPI - connection with a remote socket was reset by that socket



   All, I'm getting a connection reset error trying to use FTPAPI with a
   particular server.
   I'm using FTPAPI 3.0 beta.
   ---FTPAPI log---
   � � � � � CPF9897: 1: 230 User logged in. � � � � � � � �   � � � � � � � � � � � � � � � � � �   � � � � � CPF9897: 1: --> FTP_binaryMode(1: 0) � � � � � �   � � � � � � � � � � � � � � � � ��   � � � � � CPF9897: 1: --> FTP_passiv(1: 1) � � � � � � � �   � � � � � � � � � � � � � � � � ��   � � � � � CPF9897: 1: --> FTP_put(1hamacher_item_list_test.txt:
   /tmp/hamacher_item_list.txt)�   � � � � � CPF9897: 1: --> FTP_codePage(1: 437: 1252) � � � �   � � � � � � � � � � � � � � � ��   10:00:17 �CPF9897: 1: --> FTP_putraw(1: hamacher_item_list_test.txt:
   2: <procPtr>) � � � � ��   10:00:17 �CPF9897: 1: > TYPE A � � � � � � � � � � � � �   � � � � � � � � � � � � � � � � � ��   10:02:27 �CPF9897: 1: --> FTP_Crash(1) � � � � � � � � � �   � � � � � � � � � � � � � � � � ��   10:02:27 �CPF9897: 1: --> FTP_errorMsg(1...) �(1 parameters.) � �   � � � � � � � � � � � � � �   � � � � � CPF9897: 1: --> FTP_quit(1) � � � � � � � � �   � � � � � � � � � � � � � � � � � � �   � � � � � CPF9897: 1: Session 1 is active for socket -99. � � �   � � � � � � � � � � � � � � �   � � � � � CPF9897: 1: Session 2 is active for socket 1. � � �   � � � � � � � � � � � � � � � �   � � � � � CPF9897: 1: > QUIT � � � � � � � � � � � �   � � � � � � � � � � � � � � � � � � � ��   � � � � � CPF9897: A connection with a remote socket was reset by
   that socket. � � � � � � ��   Note the 2min elapsed time between FTP_putraw() and FTP_Crash()
   The transfer succeeds using both the IBM i client and FileZilla on my
   PC.� So I believe the issue is something I'm doing with FTPAPI.�   --IBM i client--
   put �hamacher_item_list.txt �hamacher_item_list_test.txt � � � �   � � � �   229 Entering Extended Passive Mode (|||57731|) � � � � � � � �   � � � � �   150 Opening ASCII mode data connection. � � � � � � � � � �   � � � � � ��   226 Transfer complete. � � � � � � � � � � � � � � � �   � � � � � � � � �   4144140 bytes transferred in 5.314 seconds. Transfer rate 779.787
   KB/sec.
   Note that only 5.3 seconds are required to transfer the file.
   Three years ago, I was running into a connection reset issue at another
   employer while connecting to another server.� In that case, the issue
   was sporadic and I believe was caused by the size of the file being
   transferred.
   ([1]https://www.scottklement.com/archives/ftpapi/201203/msg00001.html).
   � I'm pretty sure enabling keepalive on the socket as outline in the
   thread corrected the problem.
   Enabling keepalive this time has had no effect.
   My code is pretty simple:
   � � � � sess = ftp_conn(rmtsys:user:pass:port);
   � � � � if sess < 0;
   � � � � � FTP_crash(sess);
   � � � � endif;
   � � � � if FTP_logging(sess:log) < 0;
   � � � � � FTP_crash(sess);
   � � � � endif;
   � � � � if FTP_binaryMode(sess:mode) < 0;
   � � � � � FTP_crash(sess);
   � � � � endif;
   � � � � if FTP_passiveMode(sess:passive) < 0;
   � � � � � FTP_crash(sess);
   � � � � endif;
   � � � � if FTP_put(sess:rmtfile:lclfile) < 0;
   � � � � � FTP_crash(sess);
   � � � � endif;
   � � � � if FTP_quit(sess) < 0;
   � � � � � FTP_crash(sess);
   � � � � endif;
   Anybody see what I'm screwing up?
   Thanks!
   Charles

References

   1. https://www.scottklement.com/archives/ftpapi/201203/msg00001.html
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------