Winscp not executed in Automation script

Advertisement

Pepsican
Joined:
Posts:
4
Location:
Canada

Winscp not executed in Automation script

Winscp ver 5.9 (build 6786)
OS Win 2012 R2 STD
The Winscp.exe is used in the automation/scripted option, being called from batch (script.cmd)
Connecting to predefined session for SFTP
The line in the script:
D:\APPS\WINSCP\WINSCP.EXE /CONSOLE /script=%App%-WinSCP.SCRIPT /log=FTP-Download[%1].LOG
After executing every 15 minutes for about 5 hours, the Winscp ends without trace. No record in the event logs, no SFTP log in the master log file (FTP-Download[%1].LOG). The script is executed via BMC automate Control-m agent. If we run the script manually in logged in session, it runs ok under the same UID. If scheduled in OS local scheduler on the same server with the same user ID, it runs ok. Seems specific interaction WINSCP and BMC Control-M agent. The issue started about 1 week after OS patch installation for January 2018. Similar issue experienced in May 2017 but fixed by applying all latest software versions (BMC and Winscp).
Can we possibly use debug version of Winscp if this can provide any lead to this problem?
Thanks,
Ivan

Reply with quote

Advertisement

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

Re: Winscp not executed in Automation script

Pepsican wrote:

After executing every 15 minutes for about 5 hours, the Winscp ends without trace.
What does "end"? Do I understand right that you run (relatively) short WinSCP script every 15 minutes. And after 5 hours, WinSCP does not start anymore?

If you wrap winscp.com call (not winscp.exe) into a batch file and redirect winscp.com output to a file, do you get anything?
See https://winscp.net/eng/docs/guide_debugging_scheduler#output

No record in the event logs, no SFTP log in the master log file (FTP-Download[%1].LOG)
What do you mean by "no SFTP log"? That FTP-Download[%1].LOG is not created at all, or that there's no SFTP activity in the created log?

Reply with quote

Pepsican
Joined:
Posts:
4
Location:
Canada

Re: Winscp not executed in Automation script

Hello,
What does "end"? Do I understand right that you run (relatively) short WinSCP script every 15 minutes. And after 5 hours, WinSCP does not start anymore?
- That is correct. The call for WINSCP.exe (or.com) is silent and script just continues
--
What do you mean by "no SFTP log"? That FTP-Download[%1].LOG is not created at all, or that there's no SFTP activity in the created log?
- correct, no activity in the log at all. Empty.
--
We have another system/server with similar configuration and it runs ok there.
This is the log from the BMC agent that triggers the script. We have created another version of script that runs directory listing on Winscp folder, followed by call to wincp.com /?. We left Echo on.
--
script listing:
...
dir D:\APPS\WINSCP
D:\APPS\WINSCP\WINSCP.COM /?
:: D:\APPS\WINSCP\WINSCP.COM /script=%App%-WinSCP.SCRIPT /log=FTP-Download[%1].LOG
...
==
This is the actual log from this agent:
#@#@#@#@#@#dir D:\APPS\WINSCP
Volume in drive D is Data
Volume Serial Number is 2EB4-D706

Directory of D:\APPS\WINSCP

2018-02-01 12:38 PM <DIR> .
2018-02-01 12:38 PM <DIR> ..
2016-09-19 01:52 PM <DIR> backup
2016-07-22 09:56 AM 484,136 DragExt64.dll
2018-02-01 12:38 PM <DIR> Extensions
2017-03-10 09:55 AM 37,854 license.txt
2018-02-01 12:38 PM <DIR> PuTTY
2018-02-01 12:38 PM 137,816 unins000.dat
2018-02-01 12:37 PM 1,277,728 unins000.exe
2018-02-01 12:38 PM 22,727 unins000.msg
2017-04-19 02:44 PM 282,960 WinSCP.com
2017-04-19 02:44 PM 18,905,808 WinSCP.exe
2018-02-01 12:38 PM 101,747 WinSCP.ini
2017-11-03 08:24 AM 17,911 WinSCP.ini.bad
2017-04-19 02:44 PM 10,516,883 WinSCP.map
2017-04-19 02:44 PM 151,424 WinSCPnet.dll
11 File(s) 31,936,994 bytes
5 Dir(s) 95,883,128,832 bytes free

#@#@#@#@#@#D:\APPS\WINSCP\WINSCP.COM /?
==
The BMC says the command is triggered but not giving anything back. If we run winscp.com /? in command line with the same user we have results.

Can we try debug version of winscp that would help us to understand what is actually happening when it's called?

Thanks,
Ivan/Pepsican

Reply with quote

Pepsican
Joined:
Posts:
4
Location:
Canada

Re: Winscp not executed in Automation script

Apologies,
I did that and there was no output in the log file if triggered by BMC agent.
There is log created if I run the script manually or via OS local scheduler.

Thanks,
Pepsican

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: Winscp not executed in Automation script

So with D:\APPS\WINSCP\WINSCP.COM /? > c:\xxx\xxx.out you get the output.
And with D:\APPS\WINSCP\WINSCP.COM /script=c:\xxx\xxx.txt > c:\xxx\xxx.out you get no output?
And what about something like D:\APPS\WINSCP\WINSCP.COM /command "echo blah" "exit" > c:\xxx\xxx.out?

Reply with quote

Pepsican
Joined:
Posts:
4
Location:
Canada

Re: Winscp not executed in Automation script

Hi,
I have nothing in the for all suggested if triggered via BMC (Control-m) agent.
I have correct runs and correct logs if run via OS scheduler and manually.
BMC says they trigger the command to OS but nothing comes back from OS. That's why I'm looking for some sort of debug version of Winscp if that can give some indication what happens.
Next is to upgrade to latest stable version.
Thanks,
Pepsican

Reply with quote

martin
Site Admin
martin avatar

Re: Winscp not executed in Automation script

Thanks for your report.
I have sent you an email with a debug version of WinSCP to the address you have used to register on this forum.

Reply with quote

martin
Site Admin
martin avatar

Re: Winscp not executed in Automation script

I have sent you an email with a debug version of WinSCP to the address you have used to register on this forum.

Reply with quote

Advertisement

You can post new topics in this forum