transferring files always results in Status/error code: 1

Advertisement

joginav
Joined:
Posts:
1
Location:
philly

transferring files always results in Status/error code: 1

Hello There,

Using WINSCP developed a script to transfer files from one server to the other using SFTP. It appears that the files are transferring correctly but the log file always contains the status code 1. As a result the command to move the files to an archive folder always fails.

WINSCP version:

WinSCP Version 3.8.2 (Build 330) (OS 5.2.3790 Service Pack 1)

Transfer Protocol: SFTP

Script file

#Start Time: 2/24/2007 3:39:09 PM
Option batch On
Option confirm off
open sftp://username@hostname:22
cd \Inbound\FI_INT_003
Option transfer binary
put \\hostname\outbound\FI_INT_003\CKPPO.20070224032929
Get CKPPO.20070224032929 \\hostname\Outbound\Temp\CKPPO.20070224032929.bak
close
Exit


Logfile:


. 2007-02-24 15:39:09.201 --------------------------------------------------------------------------
. 2007-02-24 15:39:09.201 WinSCP Version 3.8.2 (Build 330) (OS 5.2.3790 Service Pack 1)
. 2007-02-24 15:39:09.201 Login time: Saturday, February 24, 2007 3:39:09 PM
. 2007-02-24 15:39:09.201 --------------------------------------------------------------------------
. 2007-02-24 15:39:09.201 Transfer Protocol: SFTP
. 2007-02-24 15:39:09.201 SSH protocol version: 2; Compression: No
. 2007-02-24 15:39:09.201 Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2007-02-24 15:39:09.201 Ciphers: aes,blowfish,3des,WARN,des; Ssh2DES: No
. 2007-02-24 15:39:09.201 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2007-02-24 15:39:09.201 SSH Bugs: -,-,-,-,-,-,-,-
. 2007-02-24 15:39:09.201 SFTP Bugs: -,-,-
. 2007-02-24 15:39:09.201 Proxy: none
. 2007-02-24 15:39:09.201 Return code variable: Autodetect; Lookup user groups: Yes
. 2007-02-24 15:39:09.201 Shell: default, EOL: 0
. 2007-02-24 15:39:09.201 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2007-02-24 15:39:09.201 Cache directory changes: Yes, Permanent: Yes
. 2007-02-24 15:39:09.201 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2007-02-24 15:39:09.201 Alias LS: No, Ign LS warn: Yes, Scp1 Comp: No
. 2007-02-24 15:39:09.201 --------------------------------------------------------------------------
. 2007-02-24 15:39:14.685 Server version: SSH-2.0-3.2.3 F-Secure SSH Windows NT Server
. 2007-02-24 15:39:14.685 We claim version: SSH-2.0-WinSCP_release_3.8.2
. 2007-02-24 15:39:14.685 Using SSH protocol version 2
. 2007-02-24 15:39:14.763 Using Diffie-Hellman with standard group "group1"
. 2007-02-24 15:39:14.763 Doing Diffie-Hellman key exchange
. 2007-02-24 15:39:15.170 Host key fingerprint is:
. 2007-02-24 15:39:15.170 ssh-dss 1024 e0:a1:2e:68:0c:88:fe:f1:50:76:77:ce:27:e7:15:cc
. 2007-02-24 15:39:15.170 Initialised AES-256 client->server encryption
. 2007-02-24 15:39:15.170 Initialised HMAC-SHA1 client->server MAC algorithm
. 2007-02-24 15:39:15.170 Initialised AES-256 server->client encryption
. 2007-02-24 15:39:15.170 Initialised HMAC-SHA1 server->client MAC algorithm
! 2007-02-24 15:39:15.513 Using username "username".
. 2007-02-24 15:39:15.513 Reading private key file "D:\Key\pfile.ppk"
! 2007-02-24 15:39:15.607 #
! 2007-02-24 15:39:15.607 # SFTP Gateway
! 2007-02-24 15:39:15.607 #
. 2007-02-24 15:39:15.779 Offered public key
. 2007-02-24 15:39:16.107 Offer of public key accepted
! 2007-02-24 15:39:16.107 Authenticating with public key "dsa-key-20061205".
. 2007-02-24 15:39:16.998 Access granted
. 2007-02-24 15:39:17.076 Opened channel for session
. 2007-02-24 15:39:17.685 Started a shell/command
. 2007-02-24 15:39:17.685 --------------------------------------------------------------------------
. 2007-02-24 15:39:17.685 Using SFTP protocol.
. 2007-02-24 15:39:17.685 Doing startup conversation with host.
> 2007-02-24 15:39:17.685 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2007-02-24 15:39:17.857 Type: SSH_FXP_VERSION, Size: 34, Number: -1
. 2007-02-24 15:39:17.857 SFTP version 3 negotiated.
. 2007-02-24 15:39:17.857 Unknown server extension newline@vandyke.com=0x0D0A
. 2007-02-24 15:39:17.857 We believe the server has signed timestamps bug
. 2007-02-24 15:39:17.857 We will use UTF-8 strings for status messages only
. 2007-02-24 15:39:17.857 Getting current directory name.
. 2007-02-24 15:39:17.857 Getting real path for '.'
> 2007-02-24 15:39:17.857 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2007-02-24 15:39:17.935 Type: SSH_FXP_STATUS, Size: 44, Number: 16
< 2007-02-24 15:39:17.935 Status/error code: 4, Message: 16, Server: syserr: No error, file: ., Language: en
* 2007-02-24 15:39:17.935 (ECommand) Error getting name of current remote directory.
* 2007-02-24 15:39:17.935 Cannot get real path for '.'.
* 2007-02-24 15:39:17.935 General failure (server should provide error description).
* 2007-02-24 15:39:17.935 Error code: 4
* 2007-02-24 15:39:17.935 Error message from server (en): syserr: No error, file: .
* 2007-02-24 15:39:17.935 Request code: 16
. 2007-02-24 15:39:17.935 Startup conversation with host finished.
. 2007-02-24 15:39:17.935 Changing directory to "\Inbound\FI_INT_003".
. 2007-02-24 15:39:17.935 Getting real path for '\Inbound\FI_INT_003'
> 2007-02-24 15:39:17.935 Type: SSH_FXP_REALPATH, Size: 32, Number: 272
< 2007-02-24 15:39:18.013 Type: SSH_FXP_NAME, Size: 67, Number: 272
. 2007-02-24 15:39:18.013 Real path is '/Inbound/FI_INT_003'
. 2007-02-24 15:39:18.013 Trying to open directory "/Inbound/FI_INT_003".
> 2007-02-24 15:39:18.013 Type: SSH_FXP_LSTAT, Size: 32, Number: 519
< 2007-02-24 15:39:18.092 Type: SSH_FXP_ATTRS, Size: 29, Number: 519
. 2007-02-24 15:39:18.092 Getting current directory name.
. 2007-02-24 15:39:18.092 Copying 1 files/directories to remote directory "/Inbound/FI_INT_003"
. 2007-02-24 15:39:18.092 PrTime: Yes; PrRO: Yes; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 01; Resume: S (102400); CalcS: No; Mask:
. 2007-02-24 15:39:18.092 TM: B; ClAr: No; ExclM(No):
. 2007-02-24 15:39:18.092 AscM: *.*html; *.htm; *.txt; *.php*; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2007-02-24 15:39:18.092 File: "\\hostname\outbound\FI_INT_003\CKPPO.20070224032929"
. 2007-02-24 15:39:18.092 Copying "\\hostname\outbound\FI_INT_003\CKPPO.20070224032929" to remote directory started.
. 2007-02-24 15:39:18.092 Binary transfer mode selected.
. 2007-02-24 15:39:18.092 Opening remote file.
> 2007-02-24 15:39:18.092 Type: SSH_FXP_OPEN, Size: 69, Number: 771
< 2007-02-24 15:39:18.185 Type: SSH_FXP_HANDLE, Size: 17, Number: 771
> 2007-02-24 15:39:18.185 Type: SSH_FXP_WRITE, Size: 44, Number: 1286
. 2007-02-24 15:39:18.264 1 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
> 2007-02-24 15:39:18.264 Type: SSH_FXP_CLOSE, Size: 17, Number: 1540
> 2007-02-24 15:39:18.264 Type: SSH_FXP_SETSTAT, Size: 65, Number: 1033
< 2007-02-24 15:39:18.373 Type: SSH_FXP_STATUS, Size: 21, Number: 1540
< 2007-02-24 15:39:18.373 Status/error code: 0
< 2007-02-24 15:39:18.764 Type: SSH_FXP_STATUS, Size: 21, Number: 1033
< 2007-02-24 15:39:18.764 Status/error code: 0
. 2007-02-24 15:39:18.764 Listing file "CKPPO.20070224032929".
> 2007-02-24 15:39:18.764 Type: SSH_FXP_LSTAT, Size: 53, Number: 1799
< 2007-02-24 15:39:18.842 Type: SSH_FXP_ATTRS, Size: 29, Number: 1799
. 2007-02-24 15:39:18.842 File: "/Inbound/FI_INT_003/CKPPO.20070224032929"
. 2007-02-24 15:39:18.842 Copying "/Inbound/FI_INT_003/CKPPO.20070224032929" to local directory started.
. 2007-02-24 15:39:18.842 Binary transfer mode selected.
. 2007-02-24 15:39:18.842 Opening remote file.
> 2007-02-24 15:39:18.842 Type: SSH_FXP_OPEN, Size: 61, Number: 2051
< 2007-02-24 15:39:18.920 Type: SSH_FXP_HANDLE, Size: 17, Number: 2051
> 2007-02-24 15:39:18.920 Type: SSH_FXP_FSTAT, Size: 17, Number: 2312
> 2007-02-24 15:39:18.920 Type: SSH_FXP_READ, Size: 29, Number: 2565
< 2007-02-24 15:39:18.998 Type: SSH_FXP_ATTRS, Size: 29, Number: 2312
. 2007-02-24 15:39:18.998 Storing reserved response
< 2007-02-24 15:39:19.154 Status/error code: 1
. 2007-02-24 15:39:19.154 3 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
> 2007-02-24 15:39:19.154 Type: SSH_FXP_CLOSE, Size: 17, Number: 3076
. 2007-02-24 15:39:19.154 Closing connection.



Please let me know how to fix this issue. THanks

Regards
Venu[/u]

Reply with quote

Advertisement

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

Re: transferring files always results in Status/error code: 1

It seems that reading of remote file fails. I cannot ten why. More verbose log may be useful.

Reply with quote

Advertisement

You can post new topics in this forum