Winscp script not connecting but session fine via GUI

Advertisement

dogwhiskers
Joined:
Posts:
1

Winscp script not connecting but session fine via GUI

There is a session created using ftps to connect to a 3rd party. The connection is fine when using the GUI although sometimes it can take over 10 seconds or it can fail but then a reconnect makes the connection connect fine.

Whn calling hte same session via a batch script it more than often fails to connect.

I have tried increasing the timeout on the session from 15 to 45 seconds however the connection still fails in the batch script. When I try the GUI the connection works usually 1st time.

Is there a switch that can be used to help the connection reconnect if it initially fails when run in batch mode? Log below

batch continue
reconnecttime 120
confirm off
Connecting to xxx.xx.xxx.xxx:990 ...
TLS connection established. Waiting for welcome message...
Connection failed.
Using TLSv1, cipher TLSv1/SSLv3: AES128-SHA, 2048 bit RSA
Disconnected from server
Connection failed.
confirm off
No session.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: Winscp script not connecting but session fine via GUI

Please attach a full log file on Debug 2 log level showing the problem (using the latest version of WinSCP).

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

kbh
Guest

Winscp script not connecting but session fine via GUI.

I am having the same problem as described above.

When using script never connects. When using GUI never connects the first time but connects on reconnect attempts.

Also below is the batch file content

cd C:\Program Files (x86)\WinSCP
winscp.com /command ^
"option batch on" ^
"option confirm off" ^
"open ftp://xxxxx:xxxxxx@<IP>/XXX/ -implicit -certificate=""xx:xx:xx"" -passive "
"cd /FISA" ^
"lcd c:\projects\XXXX_Files" ^
"put -delete xxxx.txt.pgp" ^
"exit"
  • FTP.log (15.21 KB, Private file)
Description: WINSCP Log file

Reply with quote

kbh
Guest

Winscp script not connecting but session fine via GUI

Added log file with debug 2 level messages
  • FTP.log (12.84 KB, Private file)
Description: WinSCP log with debug 2 messages

Reply with quote

Advertisement

kbh
Guest

Re: Winscp script not connecting but session fine via GUI.

martin wrote:

Did you try setting a longer timeout?

Martin,

Appreciate your response.

Yes, tried with 600 seconds timeout value, still get same error.

Using TLSv1.2, cipher TLSv1/SSLv3: AES128-SHA256, 2048 bit RSA
Disconnected from server
Connection failed.

Below is the new batch file. Also this problem is only with latest version (5.7.7), works well with version 5.5.1

cd C:\WinSCP577
winscp.com /command ^
"option batch" ^
"option confirm off" ^
"open ftps://xxx:xxxx@xx.xxx.xxx.xx:990 -implicit -certificate=""xx:xx:xx...."" -timeout=""600""" ^
"cd /XXXX" ^
"lcd c:\projects\XXXX_Files" ^
"put -delete xxxxx.txt.pgp" ^
"exit"

Reply with quote

Advertisement

You can post new topics in this forum