使用Oozie运行Shell脚本 [英] Running shell script with Oozie

查看:509
本文介绍了使用Oozie运行Shell脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过Oozie运行sh脚本,但是我遇到了一个问题:

I am trying to run a sh script through Oozie, but I am facing a problem:

无法运行程序"script.sh"(在目录中 "/mapred/local/taskTracker/dell/jobcache/job_201312061003_0001/attempt_201312061003_0001_m_000000_0/work"): java.io.IOException:错误= 2,没有这样的文件或目录.

Cannot run program "script.sh" (in directory "/mapred/local/taskTracker/dell/jobcache/job_201312061003_0001/attempt_201312061003_0001_m_000000_0/work"): java.io.IOException: error=2, No such file or directory.

请帮助我采取必要的步骤.

Please help me with necessary steps.

推荐答案

此错误确实是模棱两可的.以下是一些有助于我解决此问题的问题.

This error is really ambiguous. Here are some issues that have helped me to solve this issue.

-如果您在Kerberos集群上运行oozie工作流,请确保通过将Kerberos Keytab作为参数传递来进行身份验证:

-If you are running oozie workflows on a kerberized cluster, make sure to authenticate by passing your Kerberos Keytab as a argument:

...
<shell>
  <exec>scriptPath.sh</exec>
  <file>scriptPath.sh</file>
  <file>yourKeytabFilePath</file>
</shell>
...

-在您的外壳文件(scriptPath.sh)中,确保ro删除了第一行外壳参考.

-In your shell File (scriptPath.sh), make sure ro remove first line shell reference.

#!usr/bin/bash

实际上,如果未在所有数据节点上部署此Shell引用,则可能导致此错误代码.

indeed, if this shell reference isn't deployed on all data nodes, this can lead to this error code.

这篇关于使用Oozie运行Shell脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆