我在HDFS shell脚本sample_shell.sh
/user/user
which看起来像下面:
source /user/user/params_new.cfg
echo "HELLO WORLD"
echo $layer
该params_new.cfg也是HDFS /user/user
目录,其内容是:
layer="S"
我是新来了Oozie并试图建立在顺化的Oozie的工作流程将执行sample_shell.sh脚本。性质是如下:
<workflow-app name="shell_sample" xmlns="uri:oozie:workflow:0.4">
<start to="shell_sample"/>
<action name="shell_sample">
<shell xmlns="uri:oozie:shell-action:0.1">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<exec>/user/user/sample_shell.sh</exec>
<file>/user/user/sample_shell.sh#sample_shell.sh</file>
<file>/user/user/params_new.cfg#params_new.cfg</file>
<capture-output/>
</shell>
<ok to="end"/>
<error to="kill"/>
</action>
<kill name="kill">
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name="end"/>
但我得到以下错误:
Log Length: 165
./sample_shell.sh: line 2: /user/user/params_new.cfg: Permission denied
Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.ShellMain], exit code [1]
我不明白发生了什么事情错了!如果我删除source /user/user/params_new.cfg
从sample_shell.sh代码echo $layer
行,它工作正常!
该权限如下。
-rwxrwxrwx 3 user_name supergroup 1590 2015-03-19 04:01 /user/user/params_new.cfg
-rwxrwxrwx 3 user_name supergroup 139 2015-03-19 04:18 /user/user/sample_shell.sh
两者/用户/用户/用户目录检查权限