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

to create new topics or reply. | New User Registration

This topic contains 2 replies, has 2 voices, and was last updated by  Michael 1 year, 2 months ago.

  • Creator
  • #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,

Viewing 2 replies - 1 through 2 (of 2 total)

You must be to reply to this topic. | Create Account

  • Author
  • #52604


    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,



    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.


Viewing 2 replies - 1 through 2 (of 2 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.