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

Permission denied Hive+OOzie

  • #43727
    Daria Koroleva
    Participant

    I have such problem: i create ozzie worflow with hive query, i point a hive-site.xml file ib job.xml; but when i submit it fails with error:hive-site.xml (Permission denied).
    workflow.xml:

    ${jobTracker}
    ${nameNode}
    hive-site.xml
    /user/hue/raw_good.sql
    hive-site.xml#hive-site.xml

    d.koroleva@deltasolutions.ru
    ericsson_good
    ericsson_good complete

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

    Full error info:
    HiveActionExecutor:542 – USER[hue] GROUP[-] TOKEN[] APP[raw_ericsson_good] JOB[0000033-131113170638693-oozie-oozi-W] ACTION[0000033-131113170638693-oozie-oozi-W@raw_ericsson_good_sql] Launcher exception: hive-site.xml (Permission denied)
    java.io.FileNotFoundException: hive-site.xml (Permission denied)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.(FileOutputStream.java:194)
    at java.io.FileOutputStream.(FileOutputStream.java:84)
    at org.apache.oozie.action.hadoop.HiveMain.setUpHiveSite(HiveMain.java:161)
    at org.apache.oozie.action.hadoop.HiveMain.run(HiveMain.java:191)
    at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:37)
    at org.apache.oozie.action.hadoop.HiveMain.main(HiveMain.java:66)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:226)
    at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
    at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:429)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
    at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:162)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:396)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)
    at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:157)
    Permissions at file hive-site.xml set to 777.

  • Author
    Replies
  • #43728
    Dave
    Moderator

    Hi Daria,

    Can you put your hive-site.xml in /tmp on hdfs and point the oozie job xml to that file?

    Thanks

    Dave

    #43729
    Daria Koroleva
    Participant

    Hi Dave. Iput file hive-site at temp, give permissions to it, but get exactly identic error. My new workflow file:

    ${jobTracker}
    ${nameNode}
    /tmp/hive-site.xml
    /user/hue/raw_good.sql
    /tmp/hive-site.xml#hive-site.xml

    XXX@mail.ru
    ericsson_good
    ericsson_good complete

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

    #43842
    Daria Koroleva
    Participant

    This is problem that oozie workflow can’t open output stream in his working dir to save cope of hive-site.xml, because it have no permissions to do it:

    public static Configuration setUpHiveSite() throws Exception {
    Configuration hiveConf = initActionConf();

    OutputStream os = new FileOutputStream("hive-site.xml");

    To solve such problem need to give rights on directory:
    /hadoop/yarn/local/usercache/hue/filecache/

    #44403

    Darla,

    Can you tell us on which machine the /hadoop/yarn/local/usercache/hue/filecache/ directory is located? I have checked both my master nodes as well as the machine hosting Hue, and none of them have a /hadoop/yarn directory.

    Thanks,
    David K.

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.