michaellukashov / Far-NetBox

SFTP/SCP/FTP/FTPS/WebDAV/S3 client for Far Manager 3 (http://farmanager.com/)
https://forum.farmanager.com/viewtopic.php?t=6317
GNU General Public License v2.0
161 stars 52 forks source link

NB hangs up when got "125 Data connection already open" from ftp server. #236

Open PPaleshev opened 7 years ago

PPaleshev commented 7 years ago

Far: Far30b4949.x64.20170503 NB: 2.4.3 (build 492) Server FTP: IIS 7.5.7600

Symptoms: I try to upload any file in passive mode (binary or text - doesn't matter) and NB hangs up. From logs I can see that it recieves "125 Data connection already open" and hangs there. Logs:

< 2017-06-14 00:18:58.002 227 Entering Passive Mode (91,107,67,44,51,108)
> 2017-06-14 00:18:58.003 STOR tm.png
. 2017-06-14 00:18:58.003 Connecting to 91.107.67.44:13164 ...
< 2017-06-14 00:18:58.021 125 Data connection already open; Transfer starting.
. 2017-06-14 00:19:13.452 Timeout detected. (data connection)

In active mode NB is unable even to read directory contents, so I'm unable to say anything about it. It seems that MS has made some changes:

FTP 7.5 returns a 125 or 150 response when an FTP client sends a command needing the data connection in passive mode In earlier versions of IIS, the FTP service returns a “125 Data connection already open; transfer starting” response for APPE, STOU and STOR commands sent by FTP clients when the client and server are communicating over a passive mode connection. Additionally, FTP returns a “150 File status okay; about to open data connection.” response for the APPE, STOU and STOR commands over active mode connections.

VictorVG commented 7 years ago

Please, check use latest NB version 2.4.3.502. NetBox required Far b4400 or letter and You can download latest version in Far b4973

PPaleshev commented 7 years ago

I downloaded latest Far3 x64 distribution from official site, NB 2.4.3 (build 502), but nothing happened, it still unable to upload file to ftp. Logs:

< 2017-06-14 22:44:18.195 200 Type set to I.
> 2017-06-14 22:44:18.195 PASV
< 2017-06-14 22:44:18.216 227 Entering Passive Mode (91,107,67,44,170,136)
> 2017-06-14 22:44:18.266 STOR 50nvr_1.jpg
. 2017-06-14 22:44:18.266 Connecting to 91.107.67.44:43656 ...
< 2017-06-14 22:44:18.287 125 Data connection already open; Transfer starting.
. 2017-06-14 22:44:33.526 Timeout detected. (data connection)
. 2017-06-14 22:44:33.527 Connection was lost, asking what to do.
VictorVG commented 7 years ago

Try set settings FPT timeout >= 100 - 120 sec - many FTP servers have timeout 90 - 100 second.