Oozie shell action not running as submitting user Oozie shell action not running as submitting user hadoop hadoop

Oozie shell action not running as submitting user


This issue will occur in all cluster that are configured using Simple Security. You've an option to override the default configuration. Include the below statement at the starting of the shell script will fix this issue.

export HADOOP_USER_NAME=<Name of submitted user>;


you can make run with help of env-var

<env-var>HADOOP_USER_NAME=${wf:user()}</env-var>

<workflow-app xmlns="uri:oozie:workflow:0.3" name="shell-wf">    <start to="shell-node"/>    <action name="shell-node">        <shell xmlns="uri:oozie:shell-action:0.1">            <job-tracker>${jobTracker}</job-tracker>            <name-node>${nameNode}</name-node>            <configuration>                <property>                    <name>mapred.job.queue.name</name>                    <value>${queueName}</value>                </property>            </configuration>            <exec>test.sh</exec>    <env-var>HADOOP_USER_NAME=${wf:user()}</env-var>    <file>/user/root/test.sh</file>        </shell>        <ok to="end"/>        <error to="fail"/>    </action>    <kill name="fail">        <message>Shell action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>    </kill>    <end name="end"/></workflow-app>