Topic "WINSCP - Sending files multiple time host"

Author Message
hjchheda
[View user's profile]

Joined: 2011-09-29
Posts: 2
Location: DALLAS
Hi,

We are generating file and encrypting it in placing in our server.
When we are running FTP script using WinSCP Version 4.3.2 (Build 1201) (OS 5.2.3790 Service Pack 2). The issue is we have set the timeout to 60 sec.
But scripts on wait for 15 sec and if host confirmation don't come it reconnect and send file again. We don't want to send file again as we are getting response in 18 sec so want to know why the timeout parameter is not getting override in winscp.ini or preference level and why it wait only for 15 sec.

Please find below log output where it does this step.

. 2011-09-29 10:39:57.642 Binary transfer mode selected.
. 2011-09-29 10:39:57.642 Opening remote file.
> 2011-09-29 10:39:57.642 Type: SSH_FXP_OPEN, Size: 82, Number: 259
< 2011-09-29 10:39:57.720 Type: SSH_FXP_HANDLE, Size: 10, Number: 259
> 2011-09-29 10:39:57.720 Type: SSH_FXP_WRITE, Size: 4118, Number: 774
. 2011-09-29 10:39:57.720 2 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
> 2011-09-29 10:39:57.720 Type: SSH_FXP_CLOSE, Size: 10, Number: 1540
> 2011-09-29 10:39:57.720 Type: SSH_FXP_SETSTAT, Size: 78, Number: 521
< 2011-09-29 10:39:57.751 Type: SSH_FXP_STATUS, Size: 49, Number: 774
. 2011-09-29 10:40:12.751 Waiting for data timed out, asking user what to do.
. 2011-09-29 10:40:12.751 Asking user:
. 2011-09-29 10:40:12.751 Host is not communicating for 15 seconds.
. 2011-09-29 10:40:12.751
. 2011-09-29 10:40:12.751 Wait for another 15 seconds? ()
. 2011-09-29 10:40:12.751 Attempt to close connection due to fatal exception:
* 2011-09-29 10:40:12.751 Terminated by user.
. 2011-09-29 10:40:12.751 Closing connection.
. 2011-09-29 10:40:12.751 Sending special code: 12
. 2011-09-29 10:40:12.751 Sent EOF message
. 2011-09-29 10:40:12.751 Fatal error while disposing the SFTP queue.
. 2011-09-29 10:40:12.751 Connection was lost, asking what to do.
. 2011-09-29 10:40:12.751 Asking user:
. 2011-09-29 10:40:12.751 Terminated by user. ()
< 2011-09-29 10:40:17.844 Script: Searching for host...
. 2011-09-29 10:40:17.844 Looking up host "transmissions.xxxxxxxx.com"
. 2011-09-29 10:40:18.157 Connecting to xxx.x3.x6.x62 port 22
< 2011-09-29 10:40:18.173 Script: Connecting to host...
. 2011-09-29 10:40:18.204 Server version: SSH-2.0-SSHD
. 2011-09-29 10:40:18.204 We believe remote version has SSH-2 ignore bug
. 2011-09-29 10:40:18.204 Using SSH protocol version 2
. 2011-09-29 10:40:18.204 We claim version: SSH-2.0-WinSCP_release_4.3.2
. 2011-09-29 10:40:18.235 Using Diffie-Hellman with standard group "group14"
. 2011-09-29 10:40:18.235 Doing Diffie-Hellman key exchange with hash SHA-1
< 2011-09-29 10:40:19.251 Script: Authenticating...
. 2011-09-29 10:40:19.251 Host key fingerprint is:

Thanks
Hitesh
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Can you post a complete log file (or at least its beginning) and your script?
_________________
Martin Prikryl
hjchheda
[View user's profile]

Joined: 2011-09-29
Posts: 2
Location: DALLAS
Here is below log as requested:-

--------------------------------------------------------------------------
WinSCP Version 4.3.2 (Build 1201) (OS 5.2.3790 Service Pack 2)
Login time: Thursday, September 29, 2011 10:39:54 AM
--------------------------------------------------------------------------
Session name: XXXXXX@xxxxxx.com
Host name: xxxxxx.com (Port: 22)
User name: XXXXXX (Password: No, Key file: No)
Tunnel: No
Transfer Protocol: SFTP
Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
Proxy: none
SSH protocol version: 2; Compression: No
Bypass authentication: No
Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
SSH Bugs: -,-,-,-,-,-,-,-,-
SFTP Bugs: -,-
Return code variable: Autodetect; Lookup user groups: Yes
Shell: default
EOL: 0, UTF: 2
Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
Local directory: default, Remote directory: home, Update: No, Cache: Yes
Cache directory changes: Yes, Permanent: Yes
DST mode: 1
--------------------------------------------------------------------------
Looking up host "xxxxxx.com"
Connecting to 009.03.00.001 port 22
Server version: SSH-2.0-SSHD
We believe remote version has SSH-2 ignore bug
Using SSH protocol version 2
We claim version: SSH-2.0-WinSCP_release_4.3.2
Using Diffie-Hellman with standard group "group14"
Doing Diffie-Hellman key exchange with hash SHA-1
Host key fingerprint is:
ssh-rsa 2048 RSAnumber00:00:00:00
Initialised AES-256 CBC client->server encryption
Initialised HMAC-SHA1 client->server MAC algorithm
Initialised AES-256 CBC server->client encryption
Initialised HMAC-SHA1 server->client MAC algorithm
Reading private key file "c:\progra~1\putty\XXXXXX.ppk"
Using username "XXXXXX".
Offered public key
Offer of public key accepted
Authenticating with public key "rsa-key-10022222"
Access granted
Opened channel for session
Started a shell/command
--------------------------------------------------------------------------
Using SFTP protocol.
Doing startup conversation with host.
Type: SSH_FXP_INIT, Size: 5, Number: -1
Type: SSH_FXP_VERSION, Size: 5, Number: -1
SFTP version 3 negotiated.
We believe the server has signed timestamps bug
We will use UTF-8 strings for status messages only
Getting current directory name.
Getting real path for '.'
Type: SSH_FXP_REALPATH, Size: 10, Number: 16
Type: SSH_FXP_NAME, Size: 43, Number: 16
Real path is '/'
Startup conversation with host finished.
Script: Active session: [1] XXXXXX@xxxxxx.com
Script: binary
Script: transfer binary
Script: cd /Inbound/Encrypted
Cached directory change via "/Inbound/Encrypted" to "/Inbound/Encrypted".
Getting current directory name.
Script: /Inbound/Encrypted
Script: lcd \\servername.xxxx.com\folders\FILE_SENT\
Script: \\servername.xxxx.com\folders\FILE_SENT
Script: put XXXXXX.filename.pgp
Copying 1 files/directories to remote directory "/Inbound/Encrypted"
PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 01; Resume: S (102400); CalcS: No; Mask:
TM: B; ClAr: No; CPS: 0; ExclM(No):
AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
File: "XXXXXX.filename.pgp"
Copying "XXXXXX.filename.pgp" to remote directory started.
Binary transfer mode selected.
Opening remote file.
Type: SSH_FXP_OPEN, Size: 82, Number: 259
Type: SSH_FXP_HANDLE, Size: 10, Number: 259
Type: SSH_FXP_WRITE, Size: 4118, Number: 774
2 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
Type: SSH_FXP_CLOSE, Size: 10, Number: 1540
Type: SSH_FXP_SETSTAT, Size: 78, Number: 521
Type: SSH_FXP_STATUS, Size: 49, Number: 774
Waiting for data timed out, asking user what to do.
Asking user:
Host is not communicating for 15 seconds.

Wait for another 15 seconds? ()
Attempt to close connection due to fatal exception:
Terminated by user.
Closing connection.
Sending special code: 12
Sent EOF message
Fatal error while disposing the SFTP queue.
Connection was lost, asking what to do.
Asking user:
Terminated by user. ()
Script: Searching for host...
Looking up host "xxxxxx.com"
Connecting to 009.03.00.001 port 22
Script: Connecting to host...
Server version: SSH-2.0-SSHD
We believe remote version has SSH-2 ignore bug
Using SSH protocol version 2
We claim version: SSH-2.0-WinSCP_release_4.3.2
Using xxxx-xxxxxx with standard group "group14"
Doing xxxx-xxxxxx key exchange with hash SHA-1
Script: Authenticating...
Host key fingerprint is:
ssh-rsa 2048 RSAnumber00:00:00:00
Initialised AES-256 CBC client->server encryption
Initialised HMAC-SHA1 client->server MAC algorithm
Initialised AES-256 CBC server->client encryption
Initialised HMAC-SHA1 server->client MAC algorithm
Reading private key file "c:\progra~1\putty\XXXXXX.ppk"
Using username "XXXXXX".
Script: Using username "XXXXXX".
Offered public key
Offer of public key accepted
Authenticating with public key "rsa-key-10022222"
Script: Authenticating with public key "rsa-key-10022222".
Access granted
Opened channel for session
Started a shell/command
Script: Authenticated.
Doing startup conversation with host.
Script: Starting the session...
Type: SSH_FXP_INIT, Size: 5, Number: -1
Type: SSH_FXP_VERSION, Size: 5, Number: -1
SFTP version 3 negotiated.
We believe the server has signed timestamps bug
We will use UTF-8 strings for status messages only
Script: Reading remote directory...
Changing directory to "/Inbound/Encrypted".
Getting real path for '/Inbound/Encrypted'
Type: SSH_FXP_REALPATH, Size: 27, Number: 1808
Type: SSH_FXP_NAME, Size: 77, Number: 1808
Real path is '/Inbound/Encrypted'
Trying to open directory "/Inbound/Encrypted".
Type: SSH_FXP_LSTAT, Size: 27, Number: 2055
Type: SSH_FXP_ATTRS, Size: 29, Number: 2055
Getting current directory name.
Startup conversation with host finished.
Script: Session started.
File: "XXXXXX.filename.pgp"
Copying "XXXXXX.filename.pgp" to remote directory started.
Binary transfer mode selected.
Opening remote file.
Type: SSH_FXP_OPEN, Size: 82, Number: 2307
Type: SSH_FXP_HANDLE, Size: 10, Number: 2307
Type: SSH_FXP_WRITE, Size: 4118, Number: 2822
2 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
Type: SSH_FXP_CLOSE, Size: 10, Number: 3588
Type: SSH_FXP_SETSTAT, Size: 78, Number: 2569
Type: SSH_FXP_STATUS, Size: 49, Number: 2822
Type: SSH_FXP_STATUS, Size: 49, Number: 3078
Type: SSH_FXP_STATUS, Size: 49, Number: 3334
Type: SSH_FXP_STATUS, Size: 40, Number: 3588
Status code: 0
Type: SSH_FXP_STATUS, Size: 40, Number: 2569
Status code: 0
Script: Failed
Script: exit
Closing connection.
Sending special code: 12
Sent EOF message

------------------------------------------------------------------

Below is the scirpt which is ran :-

option echo off
option batch on
option confirm off
option transfer binary
open sftp://xxxxxx@xxxxxxx-uat.xxxxxx.xxx:22
binary
cd /Inbound/Encrypted
lcd \\servername\folder\FILE_SENT\
put filename.pgp
exit

-----------------------------------------------

Please let us know why the parameter is not getting set to 60 sec and why it resend file in 15 sec again
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
So where did you set the timeout? You are using ad-hoc session in the script. So only configuration from the INI (or registry) that applies is defaul session settings.

Anyway, I recommend you use -timeout switch of the open command:
http://winscp.net/eng/docs/scriptcommand_open
_________________
Martin Prikryl
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