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

Hortonworks Sandbox Forum

hiveserver2 tries to log to /hiveserver2.log in HDP Sandbox 2.1

  • #52470

    Hi there,

    in HDP Sandbox 2.1, hiveserver2 tries to log to /hiveserver2.log and fails because of permissions.
    Although, it does manage to write this failed logging attempt to /var/log/hive/hive-server2.log:

    log4j:ERROR setFile(null,true) call failed. /hiveserver2.log (Permission denied)
    at Method)
    at org.apache.log4j.FileAppender.setFile(
    at org.apache.log4j.FileAppender.activateOptions(
    at org.apache.log4j.DailyRollingFileAppender.activateOptions(
    at org.apache.log4j.config.PropertySetter.activate(
    at org.apache.log4j.config.PropertySetter.setProperties(
    at org.apache.log4j.config.PropertySetter.setProperties(
    at org.apache.log4j.PropertyConfigurator.parseAppender(
    at org.apache.log4j.PropertyConfigurator.parseCategory(
    at org.apache.log4j.PropertyConfigurator.configureRootCategory(
    at org.apache.log4j.PropertyConfigurator.doConfigure(
    at org.apache.log4j.PropertyConfigurator.doConfigure(
    at org.apache.log4j.PropertyConfigurator.configure(
    at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jDefault(
    at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jCommon(
    at org.apache.hadoop.hive.common.LogUtils.initHiveLog4j(
    at org.apache.hive.service.server.HiveServer2.main(
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.lang.reflect.Method.invoke(
    at org.apache.hadoop.util.RunJar.main(
    log4j:ERROR Either File or DatePattern options are not set for appender [DRFA].

    Is there a bug-tracker where such packaging issues should be reported to?

    Best regards,

  • Author
  • #52547

    Hi Michael,
    I would be happy to report this and log a defect in the Hortonworks internal JIRA. Can you please confirm for me who the owner of the directory is, both group and owner as well as permissions? I just downloaded the sandbox and show it to be hive:hadoop 644.



    Hi Ian,

    as you described, the permissions of /var/log/hive are ok:
    [root@sandbox ~]# ls -ladh /var/log/hive
    drwxr-xr-x 2 hive hadoop 4,0K 29. Apr 06:42 /var/log/hive

    Unfortunately, hiveserver2 tries to log to the root-directory “/” and reports the mentioned permission problem. The real issue is the configuration setting for the log directory.

    Best regards,

The forum ‘Hortonworks Sandbox’ 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.