我正在尝试使用包含以下命令的shell脚本在oozie工作流中运行shell操作:
.#!/bin/bash
hadoop fs -mkdir /user/mathon_k/shell_dir
.#echo "hello "
我得到以下错误:
Main class [org.apache.oozie.action.hadoop.ShellMain], exit code [1]
日志
2014-03-28 15:11:31951 info org.apache.oozie.command.wf.actionstartxcommand:user[mathon\u k]group[-]token[]app[oo\u 20140328]job[0000028-140328083804680-oozie-oozie-w]action[0000028-140328083804680-oozie-w@:start:]start action[0000028-140328083804680-oozie-oozie-w@:start:]用户重试状态:userretrycount[0],userretrymax[0],userretryinterval[10]2014-03-28 15:11:31952 warn org.apache.oozie.command.wf.actionstartxcommand:user[mathon_k]group[-]token[]app[oo_20140328]job[0000028-140328083804680-oozie-oozi-w]action[0000028-140328083804680-oozie-oozi-w@:start:[0000028-140328083804680-oozie-oozi-w@:start:]action status=done 2014-03-28 15:11:31,952 warn org.apache.oozie.command.wf.actionstartxcommand:user[mathon\u k]group[-]token[]app[oo\u 20140328]job[0000028-140328083804680-oozie-oozie-w]action[0000028-140328083804680-oozie-oozi-w@:start:]action在db中更新!2014-03-28 15:11:32027 info org.apache.oozie.command.wf.actionstartxcommand:用户[mathon\u k]组[-]令牌[]应用程序[oo\u 20140328]作业[0000028-140328083804680-oozie-oozi-w]操作[0000028-140328083804680-oozie-oozi-w@oozie_20140328]开始行动[0000028-140328083804680-oozie-oozi-w@oozie_20140328]用户重试状态为:userretrycount[0],userretrymax[0],userretryinterval[10]2014-03-28 15:11:32170警告org.apache.oozie.action.hadoop.shellactionexecutor:用户[mathon_k]组[-]令牌[]应用程序[oo_20140328]作业[0000028-140328083804680-oozie-oozi-w]操作[0000028-140328083804680-oozie-oozi-w@oozie_20140328]操作2014-03-28 15:11:32的凭据为空,669 info org.apache.oozie.action.hadoop.shellactionexecutor:用户[mathon\u k]组[-]令牌[]应用程序[oo\u 20140328]作业[0000028-140328083804680-oozie-oozi-w]操作[0000028-140328083804680-oozie-oozi-w@oozie_20140328]检查操作,外部id[job\u 201403280835\u 0020]状态[running]2014-03-28 15:11:32,772 warn org.apache.oozie.command.wf.actionstartxcommand:用户[mathon\u k]组[-]令牌[]应用程序[oo\u 20140328]作业[0000028-140328083804680-oozie-oozi-w]操作[0000028-140328083804680-oozie-oozi-w@oozie_20140328] [0000028-140328083804680-oozie-oozi-w@oozie_20140328]动作状态=运行2014-03-28 15:11:32,772 warn org.apache.oozie.command.wf.actionstartxcommand:用户[mathon\u k]组[-]令牌[]应用程序[oo\u 20140328]作业[0000028-140328083804680-oozie-oozi-w]操作[0000028-140328083804680-oozie-oozi-w@oozie_20140328] [0000028-140328083804680-oozie-oozi-w@oozie_20140328]操作已在数据库中更新!2014-03-28 15:11:45254 info org.apache.oozie.servlet.callbackservlet:用户[-]组[-]令牌[-]应用[-]作业[0000028-140328083804680-oozie-oozi-w]操作[0000028-140328083804680-oozie-oozi-w@oozie_20140328]回调以采取行动[0000028-140328083804680-oozie-oozi-w@oozie_20140328] 2014-03-28 15:11:45,332 info org.apache.oozie.action.hadoop.shellactionexecutor:用户[mathon泷k]组[-]令牌[]应用程序[oo泷20140328]作业[0000028-140328083804680-oozie-oozi-w]操作[0000028-140328083804680-oozie-oozi-w@oozie_20140328]操作完成,外部id[job\u 201403280835\u 0020]2014-03-28 15:11:45,358 warn org.apache.oozie.action.hadoop.shellactionexecutor:用户[mathonèk]组[-]令牌[]应用程序[ooè20140328]作业[0000028-140328083804680-oozie-oozi-w]操作[0000028-140328083804680-oozie-oozi-w@oozie_20140328]启动器错误,原因:主类[org.apache.oozie.action.hadoop.shellmain],退出代码[1]2014-03-28 15:11:45,518 info org.apache.oozie.command.wf.actionendxcommand:用户[mathon\u k]组[-]令牌[]应用程序[oo\u 20140328]作业[0000028-140328083804680-oozie-oozi-w]操作[0000028-140328083804680-oozie-oozi-w@oozie_20140328]对于sla 2014-03-28 15:11:45,错误被视为失败,563 info org.apache.oozie.command.wf.actionstartxcommand:用户[mathon\u k]组[-]令牌[]应用程序[oo\u 20140328]作业[0000028-140328083804680-oozie-oozi-w]操作[0000028-140328083804680-oozie-oozi-w@kill]开始行动[0000028-140328083804680-oozie-oozi-w@kill]用户重试状态为:userretrycount[0],userretrymax[0],userretryinterval[10]2014-03-28 15:11:45563 warn org.apache.oozie.command.wf.actionstartxcommand:用户[mathon\u k]组[-]令牌[]应用程序[oo\u 20140328]作业[0000028-140328083804680-oozie-oozi-w]操作[0000028-140328083804680-oozie-oozi-w@kill] [0000028-140328083804680-oozie-oozi-w@kill]行动状态=完成2014-03-28 15:11:45,563 warn org.apache.oozie.command.wf.actionstartxcommand:用户[mathon\u k]组[-]令牌[]应用程序[oo\u 20140328]作业[0000028-140328083804680-oozie-oozi-w]操作[0000028-140328083804680-oozie-oozi-w@kill] [0000028-140328083804680-oozie-oozi-w@kill]操作已在数据库中更新!2014-03-28 15:11:45626警告org.apache.oozie.command.coord.coordActionUpdateCommand:用户[mathon\u k]组[-]token[]app[oo\u 20140328]作业[0000028-140328083804680-oozie-oozi-w]操作[-]e1100:执行前命令先决条件不成立,[,coord action为空],错误代码:e1100
但是当我将shell脚本改为下面的脚本时,效果很好。
.#!/bin/bash
.#hadoop fs -mkdir /user/mathon_k/shell_dir
echo "hello "
2条答案
按热度按时间vbkedwbf1#
由于安全问题,我们在oozie中发出hadoopshell命令时也遇到了问题。您使用的是哪个版本的hadoop?哪个版本的oozie?
对于初学者,在执行hadoop命令之前,请尝试将hadoop\u user\u name设置为希望执行hadoop命令的用户的名称。
txu3uszq2#
如果您想mkdir-使用工作流hdfs操作
如果你想开派对-看起来效果不错