Problem trying to reconnect using scripted ftps.

Advertisement

JimLewis
Joined:
Posts:
5
Location:
UK

Problem trying to reconnect using scripted ftps.

Hi,

I'm using winscp 4.2.3 and have scheduled a command line call to pickup files from an ftps server. My command is -

WINSCP423.exe /log=TRANSFER.LOG /ini=WINSCP423.ini /command "open FTPS://xxxxxxxxxxx:xxxxxxxx@xxxxxxxxxx -explicitssl -passive -timeout=45" "option batch on" "option confirm off" "binary" "lcd xxxxxxxxxxxxx" "cd xxxxxxxxxxxx" "get *.rpt" exit

99% of the time this works fine. However, once daily (at different times) I get a connection error -

. 2009-10-12 06:44:53.785 --------------------------------------------------------------------------
. 2009-10-12 06:44:53.785 WinSCP Version 4.2.3 (Build 494) (OS 5.2.3790 Service Pack 2)
. 2009-10-12 06:44:53.785 Login time: 12 October 2009 06:44:53
. 2009-10-12 06:44:53.800 --------------------------------------------------------------------------
. 2009-10-12 06:44:53.800 Session name: xxxxxxxxx@xxxxxxxxxxxx
. 2009-10-12 06:44:53.800 Host name: xxxxxxxxxxx (Port: 21)
. 2009-10-12 06:44:53.800 User name: xxxxxxxxx (Password: Yes, Key file: No)
. 2009-10-12 06:44:53.816 Tunnel: No
. 2009-10-12 06:44:53.816 Transfer Protocol: FTP
. 2009-10-12 06:44:53.816 Ping type: C, Ping interval: 30 sec; Timeout: 45 sec
. 2009-10-12 06:44:53.816 Proxy: none
. 2009-10-12 06:44:53.832 FTP: FTPS: Explicit SSL; Passive: Yes [Force IP: No]
. 2009-10-12 06:44:53.832 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2009-10-12 06:44:53.832 Cache directory changes: Yes, Permanent: Yes
. 2009-10-12 06:44:53.847 DST mode: 1
. 2009-10-12 06:44:53.847 --------------------------------------------------------------------------
. 2009-10-12 06:44:53.847 Connecting to xxxxxxxxxxxxxxx ...
. 2009-10-12 06:45:15.520 A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
. 2009-10-12 06:45:16.004 Connection failed.

Please note the winscp client timeout is set to 45 seconds but the failure occurs after just 22 seconds (on occasions this varies between 20 to 26 seconds) so I'm guessing the server has responded, but incorrectly as far as the client is concerned - or - the client timeout is not being enforced. As soon as I try to run the command again, the pickup works fine for the rest of the day. Without fail, the problem will occur the next day but not at a consistent time. Ultimately I suspect this is an issue with the server and have raised this with the party involved.

However, previously I was using coreftp as my client and did not encounter this problem. I think coreftp got around this problem as it automatically retried to connect and got through on the second attempt. I tried to figure out how to do this on the command line for winscp and added the reconnecttime option...

WINSCP423.exe /log=TRANSFER.LOG /ini=WINSCP423.ini /command "open FTPS://xxxxxxxxxxx:xxxxxxxx@xxxxxxxxxx -explicitssl -passive -timeout=45" "option reconnecttime 45" "option batch on" "option confirm off" "binary" "lcd xxxxxxxxxxxxx" "cd xxxxxxxxxxxx" "get *.rpt" exit

...but it seems to have made no difference and no retry attempt was made. The failure still occurs between 20 and 25 seconds after the command line is run, suggesting no second attempt is made.

So I have the following questions -

1) Have you any suggestions as to what might cause the reported error. As mentioned, I don't think it's a timeout as I allow for 45 seconds and the error occurs before that. So I think the server must the server be giving a response, even if invalid. Either that or the timeout option in winscp isn't behaving as I'd expect.

2) Am I using the reconnect option incorrectly? Is it possible to reconnect if winscp encounters this kind of error? I have looked through the documentation and forums but just can't seem to find out if/how this can be done.

Any ideas would be gratefully received.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,441
Location:
Prague, Czechia

Re: Problem trying to reconnect using scripted ftps.

JimLewis wrote:

1) Have you any suggestions as to what might cause the reported error. As mentioned, I don't think it's a timeout as I allow for 45 seconds and the error occurs before that. So I think the server must the server be giving a response, even if invalid. Either that or the timeout option in winscp isn't behaving as I'd expect.
The timeout option does not apply to connecting the host yet.

2) Am I using the reconnect option incorrectly? Is it possible to reconnect if winscp encounters this kind of error? I have looked through the documentation and forums but just can't seem to find out if/how this can be done.
Neither reconnect does apply to open command, it does apply only to reconnectes (when connection is lost). This is on todo list.

Reply with quote

JimLewis

Thanks for your reply, Martin.

I imagine this is likely to be a network or server issue. Is there any way to increase the logging level of the log file from the command line? I want to try to identify if the server if not responding or is responding but with garbage.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,441
Location:
Prague, Czechia

JimLewis wrote:

I imagine this is likely to be a network or server issue. Is there any way to increase the logging level of the log file from the command line? I want to try to identify if the server if not responding or is responding but with garbage.
You can increase it from GUI and save the configuration. Though I doubt you get more information in this case.

Reply with quote

Advertisement

You can post new topics in this forum