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

Hive / HCatalog Forum

HIVE java.io.IOException: Permission denied

  • #41971
    afdha
    Member

    I have a problem to configuration hive

    this my error :
    Exception in thread “main” java.io.IOException: Permission denied
    at java.io.UnixFileSystem.createFileExclusively(Native Method)
    at java.io.File.createNewFile(File.java:1006)
    at java.io.File.createTempFile(File.java:1989)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:119)
    [1]+ Exit 1 nohup hive –service metastore > $HIVE_LOG_DIR/hive.out 2> $HIVE_LOG_DIR/hive.log

    can you help me ?
    plz

  • Author
    Replies
  • #42557
    Kenny Zhang
    Moderator

    Hi Geyolan,

    This permission issue means that you hive cannot create a temp file in your local fs. Could you please let me know what hive command you’re running and share the hive job log?

    Thanks,
    Kenny

    #42561
    afdha
    Member

    i just run “hive” command.

    my error log :
    nohup: ignoring input
    Exception in thread “main” java.io.IOException: Permission denied
    at java.io.UnixFileSystem.createFileExclusively(Native Method)
    at java.io.File.createNewFile(File.java:1006)
    at java.io.File.createTempFile(File.java:1989)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:119)
    /var/log/hive/hive.log (END)

    emm, can i clone hortonworks sandbox into real server ? i’m confuse at configuration.

    #42579
    Kenny Zhang
    Moderator

    Hi Afdha,

    From the error message, this means the hive client could not start due to it cannot create a log file in /var/log/hive.
    Could you please share the output of the following command?

    $ls -al /var/log/hive

    Kenny

    #42650
    afdha
    Member

    Hi Kenny Zhang.

    The output just show it.
    but user root can run command “hive”.

    emt, can i copy configuration on sandbox into my server ?

    #42664
    Kenny Zhang
    Moderator

    Hi Afdha,

    Could you please make sure the following command is execute successfully?

    chown -R hive:hadoop /var/log/hive
    chmod -R 755 /var/log/hive

    This problem is related to the folder permission, simply copy the configuration file from sandbox will not help. Please let me know whether this helps.

    Thanks.
    Kenny

    #43156
    afdha
    Member

    thanks it works after reboot, hehe

    #43473
    Kenny Zhang
    Moderator

    Hi,

    Thanks for letting us know this works.

    Kenny

The topic ‘HIVE java.io.IOException: Permission denied’ is closed to new 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.