Home Forums Hortonworks Sandbox hiveserver2 tries to log to /hiveserver2.log in HDP Sandbox 2.1

This topic contains 2 replies, has 2 voices, and was last updated by  Michael 4 months, 3 weeks ago.

  • Creator
    Topic
  • #52470

    Michael
    Participant

    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.
    java.io.FileNotFoundException: /hiveserver2.log (Permission denied)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:142)
    at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
    at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
    at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:223)
    at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
    at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
    at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
    at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:842)
    at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
    at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648)
    at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514)
    at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:580)
    at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:415)
    at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jDefault(LogUtils.java:127)
    at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jCommon(LogUtils.java:77)
    at org.apache.hadoop.hive.common.LogUtils.initHiveLog4j(LogUtils.java:58)
    at org.apache.hive.service.server.HiveServer2.main(HiveServer2.java:143)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
    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,
    Michael

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

You must be logged in to reply to this topic.

  • Author
    Replies
  • #52604

    Michael
    Participant

    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,
    Michael

    Collapse
    #52547

    iandr413
    Moderator

    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.

    Ian

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