Error mail but result success

Advertisement

JimG
Guest

Error mail but result success

Hello everyone,
First of all, thx for your amazing soft. I used it for a while on my computers.
Usually i managed to find the solution with the forum and the Faq but this time i have a weird problem. I use the last version (but already tried with the 4.33 and 4.32) with blat to send success or error mail and XML logging. On one of my computer, i've always had error mail but everything is success in the xml log. And i haven't notice any missing files so i don't understand.

Here is my batch:
@echo off
winscp.com /console /script=save.ini /log=log.xml
if errorlevel 1 goto error
echo Success
goto end
:error
echo Error!
blat.exe -to Adress -subject "Error" -body "Error" -attach "c:\program files\winscp\log.xml"
:end

Here is the save.ini:
option batch on
option confirm off
open login:pass@server
synchronize remote -delete "A" "/A"
synchronize remote -delete "B" "/B"
exit

These codes works on my other computer. Can you help me please?
Thx

Reply with quote

Advertisement

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

Re: Error mail but result success

Switch to plain text log file temporarily and inspect the log. You will find why the script is returning non zero exit code there. If not, please post the log file.

Reply with quote

JimG
Guest

Hi and thanks for the answer.
I don't know how to read the log file in txt. Where can i find the signification of error codes.
Here is the log. Can you help me?
< 2011-09-07 20:30:05.859 Type: SSH_FXP_STATUS, Size: 30, Number: 16140
< 2011-09-07 20:30:05.859 Status code: 1
> 2011-09-07 20:30:05.859 Type: SSH_FXP_CLOSE, Size: 11, Number: 16388
. 2011-09-07 20:30:05.859 Collecting synchronization list for local directory 'e:\Diffusés\SNCF La tour de Salvagny\Le 2011 07 18' and remote directory '/Data/Diffusés/SNCF La tour de Salvagny/Le 2011 07 18', mode = 0, params = 3
. 2011-09-07 20:30:05.859 Listing directory "/Data/Diffusés/SNCF La tour de Salvagny/Le 2011 07 18".
> 2011-09-07 20:30:05.859 Type: SSH_FXP_OPENDIR, Size: 63, Number: 16651
< 2011-09-07 20:30:05.890 Type: SSH_FXP_STATUS, Size: 26, Number: 16388
. 2011-09-07 20:30:05.890 Discarding reserved response
< 2011-09-07 20:30:05.937 Type: SSH_FXP_HANDLE, Size: 11, Number: 16651
> 2011-09-07 20:30:05.937 Type: SSH_FXP_READDIR, Size: 11, Number: 16908
< 2011-09-07 20:30:05.968 Type: SSH_FXP_NAME, Size: 559, Number: 16908
> 2011-09-07 20:30:05.968 Type: SSH_FXP_READDIR, Size: 11, Number: 17164
< 2011-09-07 20:30:06.000 Type: SSH_FXP_STATUS, Size: 30, Number: 17164
< 2011-09-07 20:30:06.000 Status code: 1
> 2011-09-07 20:30:06.000 Type: SSH_FXP_CLOSE, Size: 11, Number: 17412
. 2011-09-07 20:30:06.015 Collecting synchronization list for local directory 'e:\Diffusés\ERM Venissieux' and remote directory '/Data/Diffusés/ERM Venissieux', mode = 0, params = 3
. 2011-09-07 20:30:06.015 Listing directory "/Data/Diffusés/ERM Venissieux".
> 2011-09-07 20:30:06.015 Type: SSH_FXP_OPENDIR, Size: 39, Number: 17675
< 2011-09-07 20:30:06.046 Type: SSH_FXP_STATUS, Size: 26, Number: 17412
. 2011-09-07 20:30:06.046 Discarding reserved response
< 2011-09-07 20:30:06.078 Type: SSH_FXP_HANDLE, Size: 11, Number: 17675
> 2011-09-07 20:30:06.078 Type: SSH_FXP_READDIR, Size: 11, Number: 17932
< 2011-09-07 20:30:06.125 Type: SSH_FXP_NAME, Size: 256, Number: 17932
> 2011-09-07 20:30:06.125 Type: SSH_FXP_READDIR, Size: 11, Number: 18188
< 2011-09-07 20:30:06.156 Type: SSH_FXP_STATUS, Size: 30, Number: 18188
< 2011-09-07 20:30:06.156 Status code: 1
> 2011-09-07 20:30:06.156 Type: SSH_FXP_CLOSE, Size: 11, Number: 18436
. 2011-09-07 20:30:06.156 Collecting synchronization list for local directory 'e:\Diffusés\ERM Venissieux\le 25-01-2010' and remote directory '/Data/Diffusés/ERM Venissieux/le 25-01-2010', mode = 0, params = 3
. 2011-09-07 20:30:06.171 Listing directory "/Data/Diffusés/ERM Venissieux/le 25-01-2010".
> 2011-09-07 20:30:06.171 Type: SSH_FXP_OPENDIR, Size: 53, Number: 18699
< 2011-09-07 20:30:06.203 Type: SSH_FXP_STATUS, Size: 26, Number: 18436
. 2011-09-07 20:30:06.203 Discarding reserved response
< 2011-09-07 20:30:06.234 Type: SSH_FXP_HANDLE, Size: 11, Number: 18699
> 2011-09-07 20:30:06.234 Type: SSH_FXP_READDIR, Size: 11, Number: 18956
< 2011-09-07 20:30:06.265 Type: SSH_FXP_NAME, Size: 506, Number: 18956
> 2011-09-07 20:30:06.265 Type: SSH_FXP_READDIR, Size: 11, Number: 19212
< 2011-09-07 20:30:06.312 Type: SSH_FXP_STATUS, Size: 30, Number: 19212
< 2011-09-07 20:30:06.312 Status code: 1
> 2011-09-07 20:30:06.312 Type: SSH_FXP_CLOSE, Size: 11, Number: 19460
. 2011-09-07 20:30:06.312 Collecting synchronization list for local directory 'e:\Diffusés\STEP Limonest' and remote directory '/Data/Diffusés/STEP Limonest', mode = 0, params = 3
. 2011-09-07 20:30:06.359 Listing directory "/Data/Diffusés/STEP Limonest".
> 2011-09-07 20:30:06.359 Type: SSH_FXP_OPENDIR, Size: 38, Number: 19723
< 2011-09-07 20:30:06.359 Type: SSH_FXP_STATUS, Size: 26, Number: 19460
. 2011-09-07 20:30:06.359 Discarding reserved response
< 2011-09-07 20:30:06.390 Type: SSH_FXP_HANDLE, Size: 11, Number: 19723
> 2011-09-07 20:30:06.390 Type: SSH_FXP_READDIR, Size: 11, Number: 19980
< 2011-09-07 20:30:06.437 Type: SSH_FXP_NAME, Size: 1962, Number: 19980
> 2011-09-07 20:30:06.437 Type: SSH_FXP_READDIR, Size: 11, Number: 20236
< 2011-09-07 20:30:06.468 Type: SSH_FXP_STATUS, Size: 30, Number: 20236
< 2011-09-07 20:30:06.468 Status code: 1

And the end:
> 2011-09-07 23:44:21.328 Type: SSH_FXP_LSTAT, Size: 31, Number: 12212743
< 2011-09-07 23:44:21.359 Type: SSH_FXP_ATTRS, Size: 66, Number: 12212743
. 2011-09-07 23:44:21.359 Checking existence of partially transfered file.
> 2011-09-07 23:44:21.359 Type: SSH_FXP_LSTAT, Size: 40, Number: 12212999
< 2011-09-07 23:44:21.390 Type: SSH_FXP_ATTRS, Size: 66, Number: 12212999
. 2011-09-07 23:44:21.390 Resuming file transfer.
. 2011-09-07 23:44:21.390 Opening remote file.
> 2011-09-07 23:44:21.390 Type: SSH_FXP_OPEN, Size: 49, Number: 12213251
< 2011-09-07 23:44:21.437 Type: SSH_FXP_HANDLE, Size: 11, Number: 12213251
> 2011-09-07 23:44:21.437 Type: SSH_FXP_WRITE, Size: 4119, Number: 12213766
. 2011-09-08 00:18:47.234 11489 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
> 2011-09-08 00:18:47.234 Type: SSH_FXP_CLOSE, Size: 11, Number: 13684740
< 2011-09-08 00:18:47.578 Type: SSH_FXP_STATUS, Size: 26, Number: 13684230
< 2011-09-08 00:18:47.625 Type: SSH_FXP_STATUS, Size: 26, Number: 13684486
< 2011-09-08 00:18:47.625 Type: SSH_FXP_STATUS, Size: 26, Number: 13684740
< 2011-09-08 00:18:47.625 Status code: 0
> 2011-09-08 00:18:47.625 Type: SSH_FXP_REMOVE, Size: 27, Number: 13685005
< 2011-09-08 00:18:47.687 Type: SSH_FXP_STATUS, Size: 26, Number: 13685005
< 2011-09-08 00:18:47.687 Status code: 0
> 2011-09-08 00:18:47.687 Type: SSH_FXP_RENAME, Size: 62, Number: 13685266
< 2011-09-08 00:18:47.734 Type: SSH_FXP_STATUS, Size: 26, Number: 13685266
< 2011-09-08 00:18:47.734 Status code: 0
> 2011-09-08 00:18:47.734 Type: SSH_FXP_SETSTAT, Size: 52, Number: 12213513
< 2011-09-08 00:18:47.765 Type: SSH_FXP_STATUS, Size: 26, Number: 12213513
< 2011-09-08 00:18:47.765 Status code: 0
. 2011-09-08 00:18:47.765 Script: Failed
> 2011-09-08 00:18:47.765 Script: exit
. 2011-09-08 00:18:47.765 Closing connection.
. 2011-09-08 00:18:47.765 Sending special code: 12
. 2011-09-08 00:18:47.765 Sent EOF message

Reply with quote

JimG
Guest

Sorry forgot the beggining:
. 2011-09-07 20:30:01.328 --------------------------------------------------------------------------
. 2011-09-07 20:30:01.328 WinSCP Version 4.3.4 (Build 1428) (OS 5.1.2600 Service Pack 3)
. 2011-09-07 20:30:01.328 Configuration: HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\
. 2011-09-07 20:30:01.328 Login time: mercredi 7 septembre 2011 20:30:01
. 2011-09-07 20:30:01.328 --------------------------------------------------------------------------
. 2011-09-07 20:30:01.328 Session name: XXXXXXXXXXXXXXXXXXXXXXXX (Modified stored session)
. 2011-09-07 20:30:01.328 Host name: XXXXXXXXXXXXXXXXXXXX (Port: 22)
. 2011-09-07 20:30:01.328 User name: XXXXXXXX (Password: Yes, Key file: No)
. 2011-09-07 20:30:01.328 Tunnel: No
. 2011-09-07 20:30:01.328 Transfer Protocol: SFTP (SCP)
. 2011-09-07 20:30:01.328 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2011-09-07 20:30:01.328 Proxy: none
. 2011-09-07 20:30:01.328 SSH protocol version: 2; Compression: No
. 2011-09-07 20:30:01.328 Bypass authentication: No
. 2011-09-07 20:30:01.328 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2011-09-07 20:30:01.328 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2011-09-07 20:30:01.328 SSH Bugs: -,-,-,-,-,-,-,-,-
. 2011-09-07 20:30:01.328 SFTP Bugs: -,-
. 2011-09-07 20:30:01.328 Return code variable: Autodetect; Lookup user groups: Yes
. 2011-09-07 20:30:01.328 Shell: default
. 2011-09-07 20:30:01.328 EOL: 0, UTF: 2
. 2011-09-07 20:30:01.328 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2011-09-07 20:30:01.328 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2011-09-07 20:30:01.328 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2011-09-07 20:30:01.328 Cache directory changes: Yes, Permanent: Yes
. 2011-09-07 20:30:01.328 DST mode: 1
. 2011-09-07 20:30:01.328 --------------------------------------------------------------------------
. 2011-09-07 20:30:01.328 Looking up host "XXXXXXXXXXXXXXXXXXX"
. 2011-09-07 20:30:01.421 Connecting to 81.220.34.85 port 22
. 2011-09-07 20:30:01.515 Server version: SSH-2.0-OpenSSH_5.5p1 Debian-6
. 2011-09-07 20:30:01.515 We believe remote version has SSH-2 ignore bug
. 2011-09-07 20:30:01.515 Using SSH protocol version 2
. 2011-09-07 20:30:01.515 We claim version: SSH-2.0-WinSCP_release_4.3.4
. 2011-09-07 20:30:01.546 Doing Diffie-Hellman group exchange
. 2011-09-07 20:30:01.671 Doing Diffie-Hellman key exchange with hash SHA-1
. 2011-09-07 20:30:02.015 Host key fingerprint is:
. 2011-09-07 20:30:02.015 ssh-rsa 2048 d8:c2:49:c5:fa:00:e8:c5:e9:8d:33:4e:83:5e:83:31
. 2011-09-07 20:30:02.015 Initialised AES-256 SDCTR client->server encryption
. 2011-09-07 20:30:02.015 Initialised HMAC-SHA1 client->server MAC algorithm
. 2011-09-07 20:30:02.015 Initialised AES-256 SDCTR server->client encryption
. 2011-09-07 20:30:02.015 Initialised HMAC-SHA1 server->client MAC algorithm
! 2011-09-07 20:30:02.125 Using username "XXXXXXXX".
. 2011-09-07 20:30:03.046 Prompt (7, SSH password, , &Password: )
. 2011-09-07 20:30:03.046 Using stored password.
. 2011-09-07 20:30:03.046 Sent password
. 2011-09-07 20:30:03.125 Access granted
. 2011-09-07 20:30:03.156 Opened channel for session
. 2011-09-07 20:30:03.281 Started a shell/command
. 2011-09-07 20:30:03.281 --------------------------------------------------------------------------
. 2011-09-07 20:30:03.296 Using SFTP protocol.
. 2011-09-07 20:30:03.296 Doing startup conversation with host.
> 2011-09-07 20:30:03.312 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2011-09-07 20:30:03.343 Type: SSH_FXP_VERSION, Size: 138, Number: -1
. 2011-09-07 20:30:03.343 SFTP version 5 negotiated.
. 2011-09-07 20:30:03.343 Server requests EOL sequence "\n".
. 2011-09-07 20:30:03.343 Server support information:
. 2011-09-07 20:30:03.343   Attribute mask: 8FFFFFFF, Attribute bits: 800003FF, Open flags: 7F
. 2011-09-07 20:30:03.343   Access mask: 1F8, Open block masks: 0, Block masks: 0, Max read size: 131072
. 2011-09-07 20:30:03.343   Attribute extensions (0)
. 2011-09-07 20:30:03.343   Extensions (4)
. 2011-09-07 20:30:03.343     space-available
. 2011-09-07 20:30:03.343     statvfs@openssh.com
. 2011-09-07 20:30:03.343     fstatvfs@openssh.com
. 2011-09-07 20:30:03.343     check-file
. 2011-09-07 20:30:03.343 We will use UTF-8 strings when appropriate
. 2011-09-07 20:30:03.343 Getting current directory name.
. 2011-09-07 20:30:03.343 Getting real path for '.'
> 2011-09-07 20:30:03.359 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2011-09-07 20:30:03.390 Type: SSH_FXP_NAME, Size: 19, Number: 16
. 2011-09-07 20:30:03.390 Real path is '/'
. 2011-09-07 20:30:03.390 Startup conversation with host finished.
< 2011-09-07 20:30:03.390 Script: Active session: [1] XXXXXXXXXXXX
> 2011-09-07 20:30:03.390 Script: synchronize remote -delete "e:\" "/Data"
< 2011-09-07 20:30:03.390 Script: Comparing...

THANKS

Reply with quote

Advertisement

dom2282
Guest

users having timeout issues.

we have sftp on a cent os box and cleints use winSCP to connect to it. they have been few issues lately like

timing out session. error with disconnecting intermittantly

log is

< 2012-04-05 13:42:50.298 Type: SSH_FXP_NAME, Size: 627, Number: 5388
> 2012-04-05 13:42:50.298 Type: SSH_FXP_READDIR, Size: 13, Number: 5644
< 2012-04-05 13:42:50.298 Type: SSH_FXP_STATUS, Size: 28, Number: 5644
< 2012-04-05 13:42:50.298 Status code: 1
> 2012-04-05 13:42:50.298 Type: SSH_FXP_CLOSE, Size: 13, Number: 5892
. 2012-04-05 13:42:51.580 Cached directory change via ".." to "/chartis".
. 2012-04-05 13:42:51.580 Getting current directory name.
. 2012-04-05 13:42:51.595 Directory content loaded from cache.
. 2012-04-05 13:42:52.267 Changing directory to "032312".
. 2012-04-05 13:42:52.267 Getting real path for '/chartis/032312'
> 2012-04-05 13:42:52.267 Type: SSH_FXP_REALPATH, Size: 24, Number: 6160
< 2012-04-05 13:42:52.267 Type: SSH_FXP_STATUS, Size: 24, Number: 5892
. 2012-04-05 13:42:52.267 Discarding reserved response
< 2012-04-05 13:42:52.267 Type: SSH_FXP_NAME, Size: 51, Number: 6160
. 2012-04-05 13:42:52.267 Real path is '/chartis/032312'
. 2012-04-05 13:42:52.267 Trying to open directory "/chartis/032312".
> 2012-04-05 13:42:52.267 Type: SSH_FXP_LSTAT, Size: 24, Number: 6407
< 2012-04-05 13:42:52.267 Type: SSH_FXP_ATTRS, Size: 37, Number: 6407
. 2012-04-05 13:42:52.267 Getting current directory name.
. 2012-04-05 13:42:52.267 Listing directory "/chartis/032312".
> 2012-04-05 13:42:52.267 Type: SSH_FXP_OPENDIR, Size: 24, Number: 6667
< 2012-04-05 13:42:52.267 Type: SSH_FXP_HANDLE, Size: 13, Number: 6667
> 2012-04-05 13:42:52.267 Type: SSH_FXP_READDIR, Size: 13, Number: 6924
< 2012-04-05 13:42:52.267 Type: SSH_FXP_NAME, Size: 481, Number: 6924
> 2012-04-05 13:42:52.267 Type: SSH_FXP_READDIR, Size: 13, Number: 7180
< 2012-04-05 13:42:52.267 Type: SSH_FXP_STATUS, Size: 28, Number: 7180
< 2012-04-05 13:42:52.267 Status code: 1
> 2012-04-05 13:42:52.267 Type: SSH_FXP_CLOSE, Size: 13, Number: 7428
. 2012-04-05 13:42:53.345 Cached directory change via ".." to "/chartis".
. 2012-04-05 13:42:53.345 Getting current directory name.
. 2012-04-05 13:42:53.345 Directory content loaded from cache.
. 2012-04-05 13:42:54.017 Changing directory to "032712 - D".
. 2012-04-05 13:42:54.017 Getting real path for '/chartis/032712 - D'
> 2012-04-05 13:42:54.017 Type: SSH_FXP_REALPATH, Size: 28, Number: 7696
< 2012-04-05 13:42:54.017 Type: SSH_FXP_STATUS, Size: 24, Number: 7428
. 2012-04-05 13:42:54.017 Discarding reserved response
< 2012-04-05 13:42:54.017 Type: SSH_FXP_NAME, Size: 59, Number: 7696
. 2012-04-05 13:42:54.017 Real path is '/chartis/032712 - D'
. 2012-04-05 13:42:54.017 Trying to open directory "/chartis/032712 - D".
> 2012-04-05 13:42:54.017 Type: SSH_FXP_LSTAT, Size: 28, Number: 7943
< 2012-04-05 13:42:54.017 Type: SSH_FXP_ATTRS, Size: 37, Number: 7943
. 2012-04-05 13:42:54.017 Getting current directory name.
. 2012-04-05 13:42:54.017 Listing directory "/chartis/032712 - D".

Reply with quote

Advertisement

You can post new topics in this forum