SSIS package to decrypt files runs fine via command prompt and on other servers. Fails every time it is run inside of SSIS package.
Process was working perfect until today.
"C:\Program Files (x86)\WinSCP\winscp.exe" /console /log=D:\XXX\XXXXX\SFTPDownload\WinSCP.log /command "option batch on" "option confirm off" "open sftp://UserAccount:XXXXXXX@ServerName:22 -hostkey=""ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx""" " call ./decryptXX.ksh /app1/XX/XXXXXXXXX out txt decrypt_log.log signal decrypt_end decrypt_error xxx_summary &" "exit"" at "", The process exit code was "3" while the expected was "0".
Log is not created when I run it in SSIS, but is when command prompt and works as expected.
Exit code 3 usually indicates an error initializing WinSCP.
If you are using WinSCP 5.2.4 or older, you are likely a victim of bug that prevented WinSCP from being run more than approximately 32 thousand times on one Windows session (session 0 in case of SSIS).
See https://winscp.net/tracker/996 and
https://winscp.net/eng/docs/message_library_process_terminated_with_exit_code_3
Make sure you upgrade to the latest version of WinSCP. You also need to restart the server to recover the system.