Topic "Winscp script not connecting but session fine via GUI"

Author Message
dogwhiskers
[View user's profile]

Joined: 2015-07-22
Posts: 1
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.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
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.
kbh

Guest


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

kbh

Guest


Added log file with debug 2 level messages
FTP.log (12.84 KB) Private file

Description: WinSCP log with debug 2 messages

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Did you try setting a longer timeout?
kbh

Guest


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"
FTP (2).log (5.39 KB) [Download]

Description: (none)

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
So can you post 5.5.1 log 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