来自oozie的shell脚本调用失败

来自oozie的shell脚本调用失败,shell,oozie,Shell,Oozie,我有一个shell脚本,我想从oozie执行它,但它失败了 Shell脚本(test1.sh):- 参数文件:- Workflow.xml:- hive2.jdbc.url ${hive2\u jdbc\u uri} hive2.server.principal ${hive2\u服务器\u主体} ${user\u host\u name} home/hduser/scripts/test1.sh 工作流失败,错误消息[${wf:errorMessage(wf:lastErrorNode())

我有一个shell脚本,我想从oozie执行它,但它失败了

Shell脚本(test1.sh):- 参数文件:- Workflow.xml:-

hive2.jdbc.url
${hive2\u jdbc\u uri}
hive2.server.principal
${hive2\u服务器\u主体}
${user\u host\u name}
home/hduser/scripts/test1.sh
工作流失败,错误消息[${wf:errorMessage(wf:lastErrorNode())}]

当手动独立执行时,shell脚本正在成功运行。

当我删除第一行时,它对我有效。
#/来自我的shell脚本的usr/bin/ksh
。但我不知道为什么这条线会失败

#!/usr/bin/ksh
. $PWD/test1.param

kinit -k -t /home/$USER_ID/"$USER_ID".keytab $USER_ID

for tablename in $tablelist
do
    for filename in `hadoop fs -ls $sqoop_dir/$tablename|awk '{print $8}'|rev|awk -F '/' '{print $1}'|rev`
    do
        hadoop fs -mv $sqoop_dir/$tablename/"$filename" $archive_dir/$tablename/"$filename"_`date +%Y%m%d%H%M%S`
    done
done

exit 0
export sqoop_dir=/user/hduser/staging
export archive_dir=/user/hduser/archive
export tablelist="table1 table2 table3 table4 table5"
export USER_ID=superusr1
<workflow-app xmlns="uri:oozie:workflow:0.4" name="test1_wf">
        <credentials>
                <credential name="hive2_cred" type="hive2">
                        <property>
                                <name>hive2.jdbc.url</name>
                                <value>${hive2_jdbc_uri}</value>
                        </property>
                        <property>
                                <name>hive2.server.principal</name>
                                <value>${hive2_server_principal}</value>
                        </property>
                </credential>
        </credentials>

        <start to="move_stg_files_to_archive"/>

         <action name="move_stg_files_to_archive">
             <ssh xmlns="uri:oozie:ssh-action:0.1">
             <host>${user_host_name}</host>
                <command>home/hduser/scripts/test1.sh</command>            
             </ssh>
        <ok to="dly_load_wf_complete"/>
            <error to="fail"/>
        </action>

<kill name="fail">
<message>Workflow failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>

<end name="dly_load_wf_complete"/>
</workflow-app>