Trying to run a Oozie workflow but keep getting the following error message:
org.apache.oozie.action.ActionExecutorException: FNF: Not able to execute ssh-base.sh on username@servername | ErrorStream: ********************************************************************* This machine is the property of xyz....
(Note: I've setup passpharase-less access. If I run the steps manually it works, but when I run thru Oozie it doesn't. In other words, I can login to the machine as user 'oozie', then ssh username@servername (without entering password) & then run the 'command'. This works, but the Oozie workflow doesn't)
Here's my workflow.xml
<workflow-app name="my app" xmlns="uri:oozie:workflow:0.2">
<start to="sshAction"/>
<action name="sshAction">
<ssh xmlns="uri:oozie:ssh-action:0.1">
<host>username@servername</host>
<command>cd /export/home/user/test/bin;./test.sh --arg value</command>
<capture-output/>
</ssh>
<ok to="sendEmail"/>
<error to="sendEmail" />
</action>
<action name="sendEmail">
<email xmlns="uri:oozie:email-action:0.1">
<to>[email protected]</to>
<subject>Output of workflow ${wf:id()}</subject>
<body>Status of the file move: ${wf:actionData('sshAction')['STATUS']}</body>
</email>
<ok to="end"/>
<error to="end"/>
</action>
<end name="end"/>
</workflow-app>
Figured out what was wrong by looking at the code. FNF stands for 'File not found'. It appears the 'ssh action' doesn't handle commands separated by semi-colon such as this:
cd /export/home/user/test/bin;./test.sh --arg value
Here's what I did:
1) Changed the command to:
./test.sh --arg value
2) Copied test.sh to the root directory of the user.
3) Added cd /export/home/user/test/bin to the beginning of the 'test.sh'
It's working now!