我试图sh通过Oozie 运行脚本,但我遇到了一个问题:
无法运行程序"script.sh"(在目录"/ mapred/local/taskTracker/dell/jobcache/job_201312061003_0001/attempt_201312061003_0001_m_000000_0/work"):java.io.IOException:error = 2,没有这样的文件或目录.
请帮我完成必要的步骤.
小智 7
这个错误真的很模糊.以下是帮助我解决此问题的一些问题.
- 如果您在kerberized集群上运行oozie工作流,请确保通过将Kerberos Keytab作为参数传递进行身份验证:
...
<shell>
<exec>scriptPath.sh</exec>
<file>scriptPath.sh</file>
<file>yourKeytabFilePath</file>
</shell>
...
Run Code Online (Sandbox Code Playgroud)
- 在你的shell文件(scriptPath.sh)中,确保删除第一行shell引用.
#!usr/bin/bash
Run Code Online (Sandbox Code Playgroud)
实际上,如果未在所有数据节点上部署此shell引用,则可能导致此错误代码.
工作流程.xml:
...
<shell>
<exec>script.sh</exec>
<file>scripts/script.sh</file>
</shell>
...
Run Code Online (Sandbox Code Playgroud)
确保 hdfs 中的同一文件夹中有 scripts/script.sh。
| 归档时间: |
|
| 查看次数: |
26223 次 |
| 最近记录: |