Topic "winscp.com scripting disconnect with FTP over TLS"

Author Message
GwenDragon
[View user's profile]

Joined: 2014-09-04
Posts: 3
winscp.com and scripting for sync/backup a complete website over FTP and TLS stops after retrieving directory listing.

Using WinSCP 5.5.5 (Build 4605) on Windows 7 x64

The FTP-Server is a ProFTPd 1.3.5 on Linux x64 Debian 7.6

Some content of log/batch is anonymized by me!

Batch:
Code:
@echo off
setlocal
chcp 1252

set WINSCP=P:\WinSCP\winscp.com
set _BACKUPDIR=V:\BACKUP
%WinSCP% /log="%_BACKUPDIR%\winscp.log" /command "open u_ftp.WS1.de -explicittls" "synchronize local ""%_BACKUPDIR%\WS1\httpdocs\"" /httpdocs/" "exit"
endlocal


Output from Batch:
Code:
Aktive Codepage: 1252.
Connecting to ftp****.de ...
Connected with ftp****.de, negotiating TLS connection...
TLS connection established. Waiting for welcome message...
Connected
Starting the session...
Reading remote directory...
Session started.
Active session: [1] u_ftp.WS1.de
Comparing...
Local 'V:\BACKUP\WS1\httpdocs\cgi-bin\lib\MIME' <= Remote '/httpdocs/cgi-bin/lib/MIME'
Lost connection.
Disconnected from server
Could not retrieve directory listing
Error listing directory '/httpdocs/cgi-bin/lib/MIME'.
Session 'u_ftp.WS1.de' closed.
No session.


The snippet of WinScp logfile:
Code:
. 2014-09-04 16:45:10.013 TLS connection established
. 2014-09-04 16:45:10.063 modify=20140904131256;perm=adfrw;size=1474;type=file;unique=902U2300D90;UNIX.group=1003;UNIX.mode=0644;UNIX.owner=10001; Fast.pm
. 2014-09-04 16:45:10.063 modify=20140904131256;perm=flcdmpe;type=cdir;unique=902U2300D8F;UNIX.group=1003;UNIX.mode=0755;UNIX.owner=10001; .
. 2014-09-04 16:45:10.063 modify=20140904131256;perm=flcdmpe;type=pdir;unique=902U2300D8D;UNIX.group=1003;UNIX.mode=0755;UNIX.owner=10001; ..
< 2014-09-04 16:45:10.118 226 Transfer complete
. 2014-09-04 16:45:10.118 Directory listing successful
. 2014-09-04 16:45:10.118 ..;D;0;1899-12-30T01:00:00.000Z;"" [0];"" [0];---------;0
. 2014-09-04 16:45:10.118 Fast.pm;-;1474;2014-09-04T13:12:56.000Z;"10001" [0];"1003" [0];rw-r--r--;0
. 2014-09-04 16:45:10.118 Remote file '/httpdocs/cgi-bin/lib/Class/Accessor/Chained/Fast.pm' [2014-09-04T13:12:56.000Z] [1474] is modified comparing to local file 'V:\BACKUP\WS1\httpdocs\cgi-bin\lib\Class\Accessor\Chained\Fast.pm' [2013-07-08T16:21:16.000Z] [1474]
. 2014-09-04 16:45:10.118 Remote file '/httpdocs/cgi-bin/lib/Class/Accessor/Faster.pm' [2014-09-04T13:12:56.000Z] [2473] is modified comparing to local file 'V:\BACKUP\WS1\httpdocs\cgi-bin\lib\Class\Accessor\Faster.pm' [2013-07-08T16:21:16.000Z] [2473]
. 2014-09-04 16:45:10.118 Remote file '/httpdocs/cgi-bin/lib/Class/Accessor.pm' [2014-09-04T13:12:56.000Z] [18240] is modified comparing to local file 'V:\BACKUP\WS1\httpdocs\cgi-bin\lib\Class\Accessor.pm' [2013-07-08T16:21:14.000Z] [18240]
. 2014-09-04 16:45:10.118 Collecting synchronization list for local directory 'V:\BACKUP\WS1\httpdocs\cgi-bin\lib\MIME' and remote directory '/httpdocs/cgi-bin/lib/MIME', mode = Local, params = 0x2 (NoConfirmation)
. 2014-09-04 16:45:10.118 Local file 'V:\BACKUP\WS1\httpdocs\cgi-bin\lib\MIME\.' [2014-09-03T12:54:07.853Z] [0] excluded from synchronization
. 2014-09-04 16:45:10.118 Local file 'V:\BACKUP\WS1\httpdocs\cgi-bin\lib\MIME\..' [2014-09-03T12:54:07.853Z] [0] excluded from synchronization
. 2014-09-04 16:45:10.118 Local file 'V:\BACKUP\WS1\httpdocs\cgi-bin\lib\MIME\Body.pm' [2013-07-08T16:21:24.000Z] [16665] included to synchronization
. 2014-09-04 16:45:10.118 Local file 'V:\BACKUP\WS1\httpdocs\cgi-bin\lib\MIME\Decoder' [2014-09-03T12:54:06.436Z] [0] included to synchronization
. 2014-09-04 16:45:10.123 Local file 'V:\BACKUP\WS1\httpdocs\cgi-bin\lib\MIME\Decoder.pm' [2013-07-08T16:21:24.000Z] [16112] included to synchronization
. 2014-09-04 16:45:10.123 Local file 'V:\BACKUP\WS1\httpdocs\cgi-bin\lib\MIME\Entity.pm' [2013-07-08T16:21:26.000Z] [64456] included to synchronization
. 2014-09-04 16:45:10.123 Local file 'V:\BACKUP\WS1\httpdocs\cgi-bin\lib\MIME\Field' [2014-09-03T12:53:47.546Z] [0] included to synchronization
. 2014-09-04 16:45:10.123 Local file 'V:\BACKUP\WS1\httpdocs\cgi-bin\lib\MIME\Head.pm' [2013-07-08T16:21:27.000Z] [24929] included to synchronization
. 2014-09-04 16:45:10.123 Local file 'V:\BACKUP\WS1\httpdocs\cgi-bin\lib\MIME\Lite.pm' [2013-07-08T16:21:29.000Z] [89378] included to synchronization
. 2014-09-04 16:45:10.123 Local file 'V:\BACKUP\WS1\httpdocs\cgi-bin\lib\MIME\Parser' [2014-09-03T12:53:55.733Z] [0] included to synchronization
. 2014-09-04 16:45:10.123 Local file 'V:\BACKUP\WS1\httpdocs\cgi-bin\lib\MIME\Parser.pm' [2013-07-08T16:21:31.000Z] [52595] included to synchronization
. 2014-09-04 16:45:10.123 Local file 'V:\BACKUP\WS1\httpdocs\cgi-bin\lib\MIME\Tools.pm' [2013-07-08T16:21:32.000Z] [61550] included to synchronization
. 2014-09-04 16:45:10.123 Local file 'V:\BACKUP\WS1\httpdocs\cgi-bin\lib\MIME\Type.pm' [2013-07-08T16:21:33.000Z] [2728] included to synchronization
. 2014-09-04 16:45:10.123 Local file 'V:\BACKUP\WS1\httpdocs\cgi-bin\lib\MIME\Types.pm' [2013-07-08T16:21:34.000Z] [20752] included to synchronization
. 2014-09-04 16:45:10.123 Local file 'V:\BACKUP\WS1\httpdocs\cgi-bin\lib\MIME\WordDecoder.pm' [2013-07-08T16:21:34.000Z] [15273] included to synchronization
. 2014-09-04 16:45:10.123 Local file 'V:\BACKUP\WS1\httpdocs\cgi-bin\lib\MIME\Words.pm' [2013-07-08T16:21:35.000Z] [11276] included to synchronization
. 2014-09-04 16:45:10.123 Retrieving directory listing...
> 2014-09-04 16:45:10.123 CWD /httpdocs/cgi-bin/lib/MIME/
< 2014-09-04 16:45:10.173 250 CWD command successful
> 2014-09-04 16:45:10.173 PWD
< 2014-09-04 16:45:10.223 257 "/httpdocs/cgi-bin/lib/MIME" is the current directory
> 2014-09-04 16:45:10.223 TYPE A
. 2014-09-04 16:45:10.273 Disconnected from server
. 2014-09-04 16:45:10.273 Could not retrieve directory listing
< 2014-09-04 16:45:10.278 Script: Lost connection.
< 2014-09-04 16:45:10.278 Script: Disconnected from server

< 2014-09-04 16:45:10.278 Could not retrieve directory listing

< 2014-09-04 16:45:10.278 Error listing directory '/httpdocs/cgi-bin/lib/MIME'.


The problem exists with other FTPS accounts, too. And Wiscp.exe does stop too with problem of directory listing.

Downloading files with FTPS client Filezilla or GoLive CS2 works fine without any connection break.
Seems to be WinSCP related problem.

I can send you the complete log by mail.

How can i/we fix the problem?

PS: Thanks a lot for WinSCP! A good tool used for years now.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
I have responded to your email.
_________________
Martin Prikryl
GwenDragon
[View user's profile]

Joined: 2014-09-04
Posts: 3
Yes, i answered ayou by mail. I dont wanted to post internals of website to public and such log would be to big.

I looked into filezilla.log and saw some connection aborts. But filezilla did reconnect and transferred all files with no error.

Seems winscp.com does not reconnect and dones not try to resume the download/sync.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
GwenDragon wrote:
I looked into filezilla.log and saw some connection aborts. But filezilla did reconnect and transferred all files with no error.

WinSCP is currently able to automatically reconnect only when connection is lost while transferring a file, not when retrieving a directory listing.
This issue is tracked here:
http://winscp.net/tracker/show_bug.cgi?id=25
GwenDragon
[View user's profile]

Joined: 2014-09-04
Posts: 3
Thanks for BT entries.
I browsed some entries and found a posting at http://winscp.net/forum/viewtopic.php?p=41888#41888 which helped to solve my problem!

Call as admin in cmd
Code:
netsh advfirewall set global StatefulFTP disable

helped on my Windows 7.

Now, no connection is broken with WinSCP and sync works in scripts.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
Refer to documentation for details on disabling stateful FTP filtering to overcome the FTP disconnects:
http://winscp.net/eng/docs/message_disconnected
eine
[View user's profile]

Joined: 2014-12-12
Posts: 6
Location: Poland, Stettin
Related to Windows 8.0 as well.
Code:
netsh advfirewall set global StatefulFTP disable

helps in W8 too.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License