Topic "Script tries to reconnect instead of abort"

Author Message
JeroenE
[View user's profile]

Joined: 2014-02-13
Posts: 9
Location: The Netherlands
I have a script which uploads files to an FTP server.

Sometimes the server is flaky and the upload doesn't work. I can't change that (it's not my server) and I can accept if the upload fails. However, for some reason WinSCP tries to reconnect to the server instead of aborting.

I would like to abort this reconnection automatically or after some time so I know this has failed. Now winscp is just retrying this endlessly. Because I'm waiting on the result everything else is waiting until someone comes along and chooses abort.

This is how the script is started:
Code:
winscp.exe /console /timeout=60 /xmllog="mylogfile.xml" /script="myscript.script"

This is the contents of the script file:
Code:
option batch abort
option confirm off
open -passive=on FTP://user:password@ftpserver
option transfer binary
option batch abort
option confirm off
put -delete "C:\directory\myfile" "/remotedirectory/"
exit

Attached a screen shot to show what is happening on the screen.

I had assumed that the "option batch abort" would choose automatically for the abort option, but it chooses reconnect instead. Am I missing some setting or is there some way to abort these retries?
reconnect.png (9.13 KB)

Description: (none)

reconnect.png

Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24996
Location: Prague, Czechia
Use option reconnecttime X to limit the retries to X seconds.

Though note that the latest version of WinSCP defaults to 120 seconds.

So maybe you just need to upgrade.
JeroenE
[View user's profile]

Joined: 2014-02-13
Posts: 9
Location: The Netherlands
Thanks, we'll try the latest version and set the reconnecttime in the script.
Unfortunately this is difficult to test as we are depending on a remote server not workign as it should Rolling Eyes
JeroenE
[View user's profile]

Joined: 2014-02-13
Posts: 9
Location: The Netherlands
martin wrote:
Use option reconnecttime X to limit the retries to X seconds.

Though note that the latest version of WinSCP defaults to 120 seconds.

So maybe you just need to upgrade.
It happened again. I used the latest release and the reconnecttime option.

WinSCP also keeps looping with the "trying to reconnect" prompt. It does not adhere to the reconnecttime timeout and is also does not adhere to the abort option.

I found a way to simulate this and that is to have an FTP server which only allows passive connections. When you try this without the passive option in WinSCP you get the same behaviour. Unfortuntaly I don't have my own FTP server so I can not give an account/password for you to try.

Is there some other way to get WinSCP to abort this endless retrying? Or is this a bug that has to be fixed?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24996
Location: Prague, Czechia
That's a known issue:
https://winscp.net/tracker/show_bug.cgi?id=1169

But how does this affect you in reality? What happens with the server that suddenly causes the endless loop?
JeroenE
[View user's profile]

Joined: 2014-02-13
Posts: 9
Location: The Netherlands
martin wrote:
Ok, I did not know that.

martin wrote:
But how does this affect you in reality? What happens with the server that suddenly causes the endless loop?
I don't know why this happens on the server. I don't control the server; I just need to send things there.

It affects me because WinSCP keeps retrying until forever. What I'm doing is starting WinSCP and when it is finished I read the logfile to see if everything went OK.

Because WinSCP never finishes this never happens and I never get an alert that something is wrong.

I'd rather have that WinSCP would fail in these conditions as then I can do something about it. Or at least I cen try to send the files differently etc. Now it is just doing this reconnect thing until someone notices that nothing gets sent anymore.

I'm not sending only to this server, but I'm sending things in turn. So if a process hangs then everything stops.

I switched to WinSCP because the ftp.exe of Microsoft is not reliable either (and they don't want to fix it).
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24996
Location: Prague, Czechia
I'm sending you an email with a development version of WinSCP to the address you have used to register on this forum.
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