Shell Action – File Not Found

to create new topics or reply. | New User Registration

This topic contains 3 replies, has 3 voices, and was last updated by  VG 1 year, 1 month 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 to reply to this topic. | Create Account

  • 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)
Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.