Topic "No session log using console command and UNC-Path"

Author Message
X-CHECK2
[View user's profile]

Joined: 2015-10-14
Posts: 3
Location: P.O. Box 37, CH-8606 Greifensee
Starting WinSCP.exe under Windows Server 2008 R2 (64-Bit)
==========================================================
having following path and session file "\\bioforce.ch\dfs\edix\F\F_Log\WinSCP_manu.log"
(UNC-Path pointing to a data server) The logfile WinSCP_manu.log is written as expected.

Example beginning of session file WinSCP_manu.log :
. 2015-09-18 09:21:12.267 --------------------------------------------------------------------------
. 2015-09-18 09:21:12.267 WinSCP Version 5.7.3 (Build 5438) (OS 6.1.7601 Service Pack 1 - Windows Server 2008 R2 Standard)
. 2015-09-18 09:21:12.268 Configuration: HKCU\Software\Martin Prikryl\WinSCP 2\
. 2015-09-18 09:21:12.268 Log level: Normal
. 2015-09-18 09:21:12.269 Local account: BIOFORCE\adm.schoenenberger
. 2015-09-18 09:21:12.269 Working directory: C:\Program Files (x86)\WinSCP
. 2015-09-18 09:21:12.269 Process ID: 5784
. 2015-09-18 09:21:12.269 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe"
. 2015-09-18 09:21:12.269 Time zone: Current: GMT+2, Standard: GMT+1 (Mitteleuropäische Zeit), DST: GMT+2 (Mitteleuropäische Sommerzeit), DST Start: 29.03.2015, DST End: 25.10.2015
. 2015-09-18 09:21:12.270 Login time: Freitag, 18. September 2015 09:21:12
. 2015-09-18 09:21:12.270 --------------------------------------------------------------------------
. 2015-09-18 09:21:12.270 Session name: AOY77068@sftp.tradinggrid.gxs.com (Site)
. 2015-09-18 09:21:12.270 Host name: sftp.tradinggrid.gxs.com (Port: 22)
. 2015-09-18 09:21:12.270 User name: AOY77068 (Password: No, Key file: No)
. 2015-09-18 09:21:12.270 Tunnel: No
. 2015-09-18 09:21:12.271 Transfer Protocol: SFTP (SCP)
. 2015-09-18 09:21:12.271 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2015-09-18 09:21:12.271 Disable Nagle: No
. 2015-09-18 09:21:12.271 Proxy: none


Starting WinSCP.exe by a cmd file, the session file is not written !
=====================================================================

Examples:
Command file FS_Rsta.Cmd containing line
----------------------------------------
"\\bio-xa44\c$\Program Files (x86)\WinSCP\WinSCP.exe" /console /script=FS_Rsta.SFT /log="\\bioforce.ch\DFS\EDIX\F\F_Log\FS_Rsta.Log"


Script file FS_Rsta.SFT containing
----------------------------------
option batch abort
option confirm off
open AOY77068@sftp.tradinggrid.gxs.com
cd /././POLLABLE
ls
close
exit

It looks like UNC-Pathes would not be supported after /console command because the same is working on a normal workstation
**************************************************************************************************************************

Examples:
Command file FS_Rsta.Cmd containing line
----------------------------------------
"C:\Program Files\WinSCP\WinSCP.exe" /console /script=FS_Rsta.SFT /log="E:\X-Check2\F\F_Log\FS_Rsta.Log"

Script file FS_Rsta.SFT containing
----------------------------------
option batch abort
option confirm off
open AOY77068@sftp.tradinggrid.gxs.com
cd /././POLLABLE
ls
close
exit

Example beginning of session file FS_Rsta.Log:
----------------------------------------------
. 2015-10-14 19:04:46.209 --------------------------------------------------------------------------
. 2015-10-14 19:04:46.209 WinSCP Version 5.7.5 (Build 5665) (OS 6.1.7601 Service Pack 1 - Windows 7 Starter)
. 2015-10-14 19:04:46.209 Configuration: HKCU\Software\Martin Prikryl\WinSCP 2\
. 2015-10-14 19:04:46.209 Log level: Normal
. 2015-10-14 19:04:46.209 Local account: EDI-PC\Transfer
. 2015-10-14 19:04:46.209 Working directory: E:\X-Check2\F\F_TCP
. 2015-10-14 19:04:46.209 Process ID: 6108
. 2015-10-14 19:04:46.209 Command-line: "C:\Program Files\WinSCP\WinSCP.exe" /console /script=FS_Rsta.SFT /log="E:\X-Check2\F\F_Log\FS_Rsta.Log"
. 2015-10-14 19:04:46.209 Time zone: Current: GMT+2, Standard: GMT+1 (Mitteleuropäische Zeit), DST: GMT+2 (Mitteleuropäische Sommerzeit), DST Start: 29.03.2015, DST End: 25.10.2015
. 2015-10-14 19:04:46.209 Login time: Mittwoch, 14. Oktober 2015 19:04:46
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
X-CHECK2 wrote:
Examples:
Command file FS_Rsta.Cmd containing line
----------------------------------------
"\\bio-xa44\c$\Program Files (x86)\WinSCP\WinSCP.exe" /console /script=FS_Rsta.SFT /log="\\bioforce.ch\DFS\EDIX\F\F_Log\FS_Rsta.Log"

Replace the WinSCP.exe with WinSCP.com and show us the output of the run.
X-CHECK2
[View user's profile]

Joined: 2015-10-14
Posts: 3
Location: P.O. Box 37, CH-8606 Greifensee
Many thnaks for the idea to run with WinSCP.com.
That way, the log file FS_Rsta.log was written, identically as performing an manual start, see text below.

As soon as using a .com to start WinSCP (necessary to automate the run), the log file is not written anymore. We assume know, it is a problem with the rights for the user running .com files on the Server.
Best regards, Alfred
------------ the log file ------------------------
. 2015-10-22 20:09:51.399 --------------------------------------------------------------------------
. 2015-10-22 20:09:51.400 WinSCP Version 5.7.3 (Build 5438) (OS 6.1.7601 Service Pack 1 - Windows Server 2008 R2 Standard)
. 2015-10-22 20:09:51.400 Configuration: C:\Program Files (x86)\WinSCP\WinSCP.ini
. 2015-10-22 20:09:51.401 Log level: Normal
. 2015-10-22 20:09:51.401 Local account: BIOFORCE\adm.schoenenberger
. 2015-10-22 20:09:51.401 Working directory: C:\Program Files (x86)\WinSCP
. 2015-10-22 20:09:51.401 Process ID: 6132
. 2015-10-22 20:09:51.401 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe" /console=573 /consoleinstance=_5752_542
. 2015-10-22 20:09:51.402 Time zone: Current: GMT+2, Standard: GMT+1 (Mitteleuropäische Zeit), DST: GMT+2 (Mitteleuropäische Sommerzeit), DST Start: 29.03.2015, DST End: 25.10.2015
. 2015-10-22 20:09:51.402 Login time: Donnerstag, 22. Oktober 2015 20:09:51
. 2015-10-22 20:09:51.402 --------------------------------------------------------------------------
. 2015-10-22 20:09:51.402 Script: Retrospectively logging previous script records:
> 2015-10-22 20:09:51.402 Script: open sftp.tradinggrid.gxs.com
. 2015-10-22 20:09:51.402 --------------------------------------------------------------------------
. 2015-10-22 20:09:51.403 Session name: sftp.tradinggrid.gxs.com (Ad-Hoc site)
. 2015-10-22 20:09:51.403 Host name: sftp.tradinggrid.gxs.com (Port: 22)
. 2015-10-22 20:09:51.403 User name: (Password: No, Key file: No)
. 2015-10-22 20:09:51.403 Tunnel: No
. 2015-10-22 20:09:51.404 Transfer Protocol: SFTP (SCP)
. 2015-10-22 20:09:51.404 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2015-10-22 20:09:51.404 Disable Nagle: No
. 2015-10-22 20:09:51.404 Proxy: none
. 2015-10-22 20:09:51.404 Send buffer: 262144
. 2015-10-22 20:09:51.404 SSH protocol version: 2; Compression: No
. 2015-10-22 20:09:51.405 Bypass authentication: No
. 2015-10-22 20:09:51.405 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2015-10-22 20:09:51.405 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2015-10-22 20:09:51.405 KEX: dh-gex-sha1,dh-group14-sha1,dh-group1-sha1,rsa,WARN
. 2015-10-22 20:09:51.405 SSH Bugs: A,A,A,A,A,A,A,A,A,A,A
. 2015-10-22 20:09:51.405 Simple channel: Yes
. 2015-10-22 20:09:51.405 Return code variable: Autodetect; Lookup user groups: A
. 2015-10-22 20:09:51.408 Shell: default
. 2015-10-22 20:09:51.408 EOL: 0, UTF: 2
. 2015-10-22 20:09:51.408 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2015-10-22 20:09:51.408 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2015-10-22 20:09:51.408 SFTP Bugs: A,A
. 2015-10-22 20:09:51.409 SFTP Server: default
. 2015-10-22 20:09:51.409 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2015-10-22 20:09:51.409 Cache directory changes: Yes, Permanent: Yes
. 2015-10-22 20:09:51.409 DST mode: 1
. 2015-10-22 20:09:51.409 --------------------------------------------------------------------------
. 2015-10-22 20:09:51.410 Looking up host "sftp.tradinggrid.gxs.com"
. 2015-10-22 20:09:51.540 Connecting to 204.90.130.72 port 22
. 2015-10-22 20:09:51.849 Server version: SSH-2.0-GXSSSHD_Comments
. 2015-10-22 20:09:51.849 Using SSH protocol version 2
. 2015-10-22 20:09:51.850 We claim version: SSH-2.0-WinSCP_release_5.7.3
. 2015-10-22 20:09:52.164 Doing Diffie-Hellman group exchange
. 2015-10-22 20:09:52.859 Doing Diffie-Hellman key exchange with hash SHA-256
. 2015-10-22 20:09:53.260 Verifying host key rsa2 0x10001,0x8b5108811cda4d33 cf14757dffa8e15b 053342e611b8f25f 979d8e3612883d18 ce1d2945fc40d752 593e532dd8ab1ffc d92c955d15f34a34 e531307ca805af99 151e7d3f06024377 bf14edc621f0eb04 882a08f03ca45d50 fbfdda1ee3692a83 228d17bf78141f86 71f579c068cd721f 8fe656c3e2442ebd a0ec7eb99b396215 with fingerprint ssh-rsa 1024 80:5a:4c:76:5e:53:d1:b8:1a:db:3f:e4:55:f7:81:a9
. 2015-10-22 20:09:53.261 Host key matches cached key
. 2015-10-22 20:09:53.262 Host key fingerprint is:
. 2015-10-22 20:09:53.262 ssh-rsa 1024 80:5a:4c:76:5e:53:d1:b8:1a:db:3f:e4:55:f7:81:a9
. 2015-10-22 20:09:53.262 Initialised AES-128 SDCTR client->server encryption
. 2015-10-22 20:09:53.262 Initialised HMAC-SHA1 client->server MAC algorithm
. 2015-10-22 20:09:53.265 Initialised AES-128 SDCTR server->client encryption
. 2015-10-22 20:09:53.266 Initialised HMAC-SHA1 server->client MAC algorithm
. 2015-10-22 20:09:54.041 Prompt (username, "SSH login name", <no instructions>, "login as: ")
. 2015-10-22 20:10:01.988 Response: "AOY77068"
. 2015-10-22 20:10:02.276 Prompt (password, "SSH password", <no instructions>, "&Passwort:")
. 2015-10-22 20:10:45.190 Sent password
. 2015-10-22 20:10:45.377 Access granted
. 2015-10-22 20:10:45.377 Opening session as main channel
. 2015-10-22 20:10:45.537 Opened main channel
. 2015-10-22 20:10:45.875 Started a shell/command
. 2015-10-22 20:10:45.876 --------------------------------------------------------------------------
. 2015-10-22 20:10:45.877 Using SFTP protocol.
. 2015-10-22 20:10:45.878 Doing startup conversation with host.
> 2015-10-22 20:10:45.878 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2015-10-22 20:10:46.038 Type: SSH_FXP_VERSION, Size: 33, Number: -1
. 2015-10-22 20:10:46.039 SFTP version 3 negotiated.
. 2015-10-22 20:10:46.039 Unknown server extension newline@vandyke.com="\n"
. 2015-10-22 20:10:46.039 We believe the server has signed timestamps bug
. 2015-10-22 20:10:46.039 We will use UTF-8 strings until server sends an invalid UTF-8 string as with SFTP version 3 and older UTF-8 string are not mandatory
. 2015-10-22 20:10:46.039 Getting current directory name.
. 2015-10-22 20:10:46.039 Getting real path for '.'
> 2015-10-22 20:10:46.040 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2015-10-22 20:10:46.192 Type: SSH_FXP_NAME, Size: 51, Number: 16
. 2015-10-22 20:10:46.192 Real path is '/AOY77068'
. 2015-10-22 20:10:46.192 Startup conversation with host finished.
< 2015-10-22 20:10:46.193 Script: Aktive Sitzung: [1] sftp.tradinggrid.gxs.com
> 2015-10-22 20:11:10.687 Script: cd /././POLLABLE
. 2015-10-22 20:11:10.687 Changing directory to "/././POLLABLE".
. 2015-10-22 20:11:10.687 Getting real path for '/././POLLABLE'
> 2015-10-22 20:11:10.688 Type: SSH_FXP_REALPATH, Size: 22, Number: 272
< 2015-10-22 20:11:10.842 Type: SSH_FXP_NAME, Size: 77, Number: 272
. 2015-10-22 20:11:10.843 Real path is '/AOY77068/././POLLABLE'
. 2015-10-22 20:11:10.843 Trying to open directory "/AOY77068/././POLLABLE".
> 2015-10-22 20:11:10.843 Type: SSH_FXP_LSTAT, Size: 31, Number: 519
< 2015-10-22 20:11:10.994 Type: SSH_FXP_ATTRS, Size: 21, Number: 519
. 2015-10-22 20:11:10.995 Getting current directory name.
< 2015-10-22 20:11:10.995 Script: /AOY77068/././POLLABLE
> 2015-10-22 20:11:20.537 Script: ls
. 2015-10-22 20:11:20.562 Listing directory "/AOY77068/././POLLABLE".
> 2015-10-22 20:11:20.562 Type: SSH_FXP_OPENDIR, Size: 31, Number: 779
< 2015-10-22 20:11:20.724 Type: SSH_FXP_HANDLE, Size: 31, Number: 779
> 2015-10-22 20:11:20.724 Type: SSH_FXP_READDIR, Size: 31, Number: 1036
< 2015-10-22 20:11:20.966 Type: SSH_FXP_STATUS, Size: 45, Number: 1036
< 2015-10-22 20:11:20.967 Status code: 1
. 2015-10-22 20:11:20.967 Listing file "/AOY77068/././POLLABLE/..".
> 2015-10-22 20:11:20.967 Type: SSH_FXP_LSTAT, Size: 34, Number: 1287
< 2015-10-22 20:11:21.117 Type: SSH_FXP_ATTRS, Size: 21, Number: 1287
. 2015-10-22 20:11:21.118 ..;D;0;2015-10-22T18:12:09.000Z;"" [0];"" [0];rw-------;0
> 2015-10-22 20:11:21.118 Type: SSH_FXP_CLOSE, Size: 31, Number: 1540
. 2015-10-22 20:11:21.118 ..;D;0;2015-10-22T18:12:09.000Z;"" [0];"" [0];rw-------;0
< 2015-10-22 20:11:21.118 Script: Drw------- 0 0 Oct 22 20:12:09 2015 ..
> 2015-10-22 20:11:30.837 Script: close
. 2015-10-22 20:11:30.837 Closing connection.
. 2015-10-22 20:11:30.837 Sending special code: 12
. 2015-10-22 20:11:30.837 Sent EOF message
X-CHECK2
[View user's profile]

Joined: 2015-10-14
Posts: 3
Location: P.O. Box 37, CH-8606 Greifensee
Please close the topic. The solution was, to start WinSCP not over a .cmd file but directly out of the data base called Conzept 16 from vectorsoft.de
Many thanks for help.
Regards,
Alfred Schaffer
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