Running shell script with Oozie

后端 未结 9 1306
北荒
北荒 2021-02-13 15:25

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

Cannot run program \"script.sh\" (in directory \"/mapred/local/tas

相关标签:
9条回答
  • 2021-02-13 16:18

    I had this same issue because of something really silly. I added a shell block in the workflow, then I selected the corresponding sendMail.sh, but I forgot to add the file sendMail.sh in FILE +.

    0 讨论(0)
  • 2021-02-13 16:20

    workflow.xml :

    ...
    <shell>
      <exec>script.sh</exec>
    
      <file>scripts/script.sh</file>
    </shell>
    ...
    

    Make sure you have scripts/script.sh in the same folder in hdfs.

    0 讨论(0)
  • 2021-02-13 16:25

    In addition to what others said, this can also be caused by a shell script having wrong line endings (e.g. CRLF for Windows). At least this happened to me :)

    0 讨论(0)
提交回复
热议问题