on 08-07-2014 6:44 PM
Hi Experts,
I am currently using the Run OS command after message processing functionality of the file adapter.
However, the unix script doesn't seem to work when run via communication channel.
The script runs properly when executed manually.
The communication channel logs don't show any error as well.
Do you have any ideas as to where the error might be.
Thanks,
Mike
Hi All,
Thank you for your replies. I appreciate this.
@Anand, here is the script:
#!/usr/bin/sh
#version 1
hostname=$(uname -a | cut -f 2 -d " ")
MAILTO="michael.anthony.s.uy@gmail.com "
homedir=$PWD
echo $homedir | mailx -m -s "OB10 $hostname" $MAILTO
/opt/java6/bin/jar -xvf OB10.zip
ll | mailx -m -s "OB10 $hostname" $MAILTO
What's puzzling me is that I am able to receive the email alerts.
This means that the user has sufficient authorization to execute the script.
But the unzip command is not working.
I have seen the unzip work when run manually.
Thanks,
Mike
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mike,
Sorry for the delay in responding. The SAP PI Service User will be on par with any user(your user) on the UNIX box. Add code to switch "user" in the script to your user. So that the subsequent commands will be executed with your user and it should be as if you are executing it manually.
Let me know how you go.
Cheers,
Anand
Hi Michael,
Check whether the SAP PI Service user has authorization to execute the script. Try to use simple script or touch file commands to ensure the service user has authorization to execute commands at OS level.
Hope it helps!
Cheers,
Anand
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael,
Thats the disadvantage of scripts. We cant see logs in CC monitoring or anywhere. Do one thing, try to write logs into a log file in app server using "echo" at different stages of the code. You might get some idea on what's happening really.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
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.