Hi,

This is just the redirect of the output/error of the ssh-wrapper script,
the real script is executed by ssh-wrapper (
https://github.com/apache/oozie/blob/master/core/src/main/resources/ssh-wrapper.sh
)
like this:

if $cmnd "$@" >>${stdout} 2>>${stderr} then...

where the files are defined using different postfixes:

stdout="$dir/$mpid.$actionId.stdout"
stderr="$dir/$mpid.$actionId.stderr"

Sala



On Thu, Dec 5, 2019 at 2:17 AM girish talisetty <girishtalise...@gmail.com>
wrote:

>
> https://stackoverflow.com/questions/59136831/oozie-ssh-action-stderr-also-routing-to-stdout-is-this-a-known-issue-or-for-a-p
>
> I executed oozie ssh action with python script having logging enabled.
>
>    1. Stdout log routed to stdout logfile.
>    2. Stderr log also routed to Stdout logfile
>    3. Exception liks exit(1) also routed to stdout logfile.
>
> I verified oozie ssh wrapper script, where it clearly wrote to redirect
> stderr aslo stdout.
>
> Would like to understand , is there a specific reason doing that or am I
> missing something.
>
>
> https://github.com/apache/oozie/blob/master/core/src/main/resources/ssh-base.sh
>
> preserveArgs=${1}
> if [ $preserveArgs == "PRESERVE_ARGS" ]
> then
>     $dir/ssh-wrapper.sh "${@}" </dev/null >/dev/null 2>&1 &
>     echo $!
> else
>     cmnd="$dir/ssh-wrapper.sh ${*}"
>     ${cmnd} </dev/null >/dev/null 2>&1 &
>     echo $!
> fi
>

Reply via email to