The Hortonworks Community Connection is now live. A completely rebuilt Q&A forum, Knowledge Base, Code Hub and more, backed by the experts in the industry.

You will be redirected here in 10 seconds. If your are not redirected, click here to visit the new site.

The legacy Hortonworks Forum is now closed. You can view a read-only version of the former site by clicking here. The site will be taken offline on January 31,2016

Oozie Forum

Oozie Streaming Job Fails when using "Add File" section

  • #45776

    I have installed HDP 2.x, and hue. (2 hosts)

    I need to solve this issue as I’m new to oozie workflows.
    I followed example here:
    It works perfectly if I have mapper and reducers in all hosts at respective paths only. I see ambari-qa smoke test of oozie is fine but when I submit a streaming job from Hue UI for Oozie, where mapper and reducers where shell scripts which performs word count (term frequency) and I wanted to use “Add File” (-file in hadoop command line) section in Oozie workflow editor and upload mapper and reducers to HDFS. After this change and submitting this job, there was an error. I get the following error for all attempts of map tasks:

    2013-12-16 19:21:24,278 ERROR [main] org.apache.hadoop.streaming.PipeMapRed: configuration exception Cannot run program “/hadoop/yarn/local/usercache/root/appcache/application_1387201627160_0006/container_1387201627160_0006_01_000002/./”: error=2, No such file or directory

    This means it can’t able to find mapper and reducer in that path where oozie/mapred/yarn will create files onfly. Do I have any oozie configuration and workflow issues? (logs by email:

    In HDFS, I have all paths and files setup correctly under root user.

    Note: I can able to run streaming jobs without oozie as:
    cd /root/mrtest/
    -rwxrwxrwx 1 root root 235 Dec 11 11:37
    -rwxrwxrwx 1 root root 273 Dec 11 11:37

    hadoop jar /usr/lib/hadoop-mapreduce/hadoop-streaming- -D -input crane_in1 -output crane_out2 -file ./ -mapper -file ./ -reducer

    It seems I cant attach logs here. Please mail me for files and logs.

  • Author
  • #45890

    I solved this problem by refering at:!searchin/hue-user/No%2420such%2420file%2420or%2420directory%7Csort%3arelevance

    I edited shell scripts in windows notepad/wordpad and uploaded via “Add File” upload method. This means for each end of line I see \r\n appended and this causes the error. I need to do dos2unix conversion and made it work. But why the error message is misleading? “No such file or directory”

The forum ‘Oozie’ is closed to new topics and replies.

Support from the Experts

A HDP Support Subscription connects you experts with deep experience running Apache Hadoop in production, at-scale on the most demanding workloads.

Enterprise Support »

Become HDP Certified

Real world training designed by the core architects of Hadoop. Scenario-based training courses are available in-classroom or online from anywhere in the world

Training »

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.