[
https://issues.apache.org/jira/browse/OOZIE-1920?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14079437#comment-14079437
]
Richard Williams commented on OOZIE-1920:
-----------------------------------------
This seems to be related to an issue we've been having since upgrading to the
CDH 5.1 distribution of Oozie, in which Oozie no longer correctly recognizes
that an SSH action has failed. We believe that this is because the command the
SshActionExecutor issues to check for failure, in which it uses ls to check
whether there is a .error file for the current run of the action in question on
the target machine, appears to be built with the assumption that the action's
run is always 1, with the result that it always looks for a file ending with
"@1.error" in the action's directory.
(For example, if the generated .stdout file for the action's first run is
"pid.workflowId@[email protected]", the generated .error file in the event of
a failure will be "pid.workflowId@[email protected]"; however, the command
issued to check for this file will incorrectly look for
"pid.workflowId@[email protected]" instead, just as the command issued to get
the contents of the .stdout file incorrectly cats
"pid.workflowId@[email protected]".)
One rather strange bit of behavior that we've observed is that the
SshActionExecutor appears to correctly identify the pid file in the action's
directory (which it cats to retrieve the PID of the process that is actually
executing the SSH action's configured command); i.e., on the action's first
run, the executor will cat the file ending with "@0.pid", on the second run, it
will cat the file ending with "@1.pid", and so on.
> Capture Output for SSH Action doesn't work
> ------------------------------------------
>
> Key: OOZIE-1920
> URL: https://issues.apache.org/jira/browse/OOZIE-1920
> Project: Oozie
> Issue Type: Bug
> Components: action
> Affects Versions: 4.0.0
> Environment: CDH 5.0.2
> Reporter: Alessandro Costantino
> Priority: Blocker
> Labels: cloudera, oozie, ssh
>
> Running a simple workflow that have a shell action with capture-output
> enabled, the SShActionExecutor look at the wrong stdout file. This is the the
> command that I found in the log:
> ssh -o PasswordAuthentication=no -o KbdInteractiveDevices=no -o
> StrictHostKeyChecking=no -o ConnectTimeout=20 workflow@redhat5 cat
> oozie-oozi/0000008-140708170302737-oozie-oozi-W/fileProcessing--ssh/22350.0000008-140708170302737-oozie-oozi-W@[email protected]
> But the generated stdout file is
> `/home/instadoc/oozie-oozi/0000008-140708170302737-oozie-oozi-W/fileProcessing--ssh/22350.0000008-140708170302737-oozie-oozi-W@[email protected]`
> If you relaunch the action the ID that prepend the .stdout extension could
> vary (ie: @9.stdout, @4.stdout) but the SShActionExecutor looks always at
> @0.stdout.
--
This message was sent by Atlassian JIRA
(v6.2#6252)