Home Forums Oozie Shell Action – File Not Found

This topic contains 3 replies, has 3 voices, and was last updated by  VG 6 months, 4 weeks ago.

  • Creator
    Topic
  • #44576

    Nick Martin
    Participant

    - HDP 1.3.2

    I’ve configured an Oozie workflow in Hue that executes a shell action. I stored the shell command in /user/me/command.sh and the config for the workflow is:

    ${jobTracker}
    ${nameNode}
    command.sh
    /user/me/command.sh#command.sh

    Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]

    I get the following error:

    Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.ShellMain], main() threw exception, Cannot run program “command.sh” (in directory “/u01/hadoop/mapred/taskTracker/me/jobcache/job_201311150842_0279/attempt_201311150842_0279_m_000000_0/work”): java.io.IOException: error=2, No such file or directory
    java.io.IOException: Cannot run program “command.sh” (in directory “/u01/hadoop/mapred/taskTracker/NiMartin/jobcache/job_201311150842_0279/attempt_201311150842_0279_m_000000_0/work”): java.io.IOException: error=2, No such file or directory

    Shell command is:

    #!/bin/bash
    for file in /user/me/directory/var_check/part*
    do
    ls /user/me/directory/var_check/part* | awk ‘NR % 2 == N { print }’|xargs rm -fv
    done

    Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

  • Author
    Replies
  • #54286

    VG
    Participant

    I have tried removing the path and put the file in one of hdfs location and tried from hue still not working and giving the error.

    in directory “/mapred/local/taskTracker/cloudera/jobcache/job_201405220954_0015/attempt_201405220954_0015_m_000000_0/work”): java.io.IOException: error=2, No such file or directory

    Please advice.

    Regards,
    VG

    Collapse
    #54285

    VG
    Participant

    Hi,

    I’m also getting same issue. How to fix this?

    Regards,
    VG

    Collapse
    #44808

    Yi Zhang
    Moderator

    Hi Nick,

    Can you try remove the line of
    #!/bin/bash
    from the script?

    Thanks,
    Yi

    Collapse
Viewing 3 replies - 1 through 3 (of 3 total)