on 01-27-2012 7:14 PM
Hi All,
I have requirement similar to the one in this thread:
Requirement:
PI need to pick the file from source directory on PI server which is Windows 2003 and send it to target directory using SFTP.
I'm using PSCP command for this purpose.
When I run the PSCP script from command prompt on PI server on Windows 2003, script is working fine.
Same batch file is called from PI File adapter but script is not getting invoked.
In the communication channel logs, "Executed OS command" is available. There are no Error/Warning messages in the log.
NFS transport protocol is used in the File communication channel.
Complete directory path of the batch file is mentioned in File channel -> Run Operating System command after message processing. Also tried giving timeout in seconds but still not working.
Command line in Receiver file adapter:
C://Outbound/SCPtest.bat %F SFTPserver.com:/dir/test
Please let me know if anyone has experience on this and tested successfully.
Thanks,
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael,
I tried the blog and caught the following error:
'echooo' is not recognized as an internal or external command,
operable program or batch file.
Hi Greg,
The user has authorization to put files from PI server to the SFTP. The script works from Windows server when executed from command prompt but not from Communication channel. PI server is on Windows server. I'm not sure what you meant when tried from OS level and but not from PI.
Thanks,
John
Hi John,
I'm not sure what you meant when tried from OS level and but not from PI.
I meant that your script works well when executed from Windows, but not when executed from the Communication Channel. And these symptoms are identical to the case described in that thread: , there the authorizations were the solution.
In relation to Michal's response and his blog: do not use the whole
cmd.exe /C "echooo error 2> D:\usr\sap\CXX\SYS\global\demo1.txt"
statement in your communication channel. I don't really think this is the point in Michal's blog. Add the statement like
> log.txt
to your current statement instead. Thanks to this, the results of your .bat script will be written to the log.txt file in the same directory, and most probably you will find some error details from your script there. It is the ">" character that allows you to put results of one command somewhere else then the command line itself.
Please let us know if you had further questions.
Hope this helps,
Greg
Hi Horia,
Thanks for the link but I had already gone through the link, the problem is I don't get the prompt to store the key in cache. We only access to a specific directory of the SFTP server, could this be the problem why we are not seeing the prompt to cache the key? Do we also need to give the SFTP server admin to store our ssh key and we need to store their SSH key on our server which is Windows server?
Regards,
John
Anyone knows how to fix this error?
The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's rsa2 key fingerprint is:
xxxxxxxx.........
Connection abandoned.
Lost connection
Please note that I don't get prompt to store key in cache.
Thanks,
John
Hi!!!
Just to update the url blog (in 2020 the url sends to error 'Page no found')
https://blogs.sap.com/2005/08/17/xi-operation-system-command-error-catching/
L GF
Hi John,
Did you try the solution provided in the thread you linked? Are you absolutely sure your PI user has sufficient authorization in the target SFTP server? Note that also in Geetha's case the script was executed successfully on OS level, but not from PI.
Hope this helps,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.