Uploaded image for project: 'HCatalog'
  1. HCatalog
  2. HCATALOG-588

Webhcat server wouldn't start as it is unable to write templeton.log

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.5
    • webhcat-svr
    • None

    Description

      When I run the command
      sudo su hcat -c "/usr/lib/hcatalog/sbin/webhcat_server.sh start"
      from a directory where hcat user doesn't have permission to write it fails to start throwing the following error in the logfile:
      log4j:ERROR setFile(null,true) call failed.
      java.io.FileNotFoundException: ./templeton.log (Permission denied)
      at java.io.FileOutputStream.openAppend(Native Method)
      at java.io.FileOutputStream.<init>(FileOutputStream.java:192)
      at java.io.FileOutputStream.<init>(FileOutputStream.java:116)
      at org.apache.log4j.FileAppender.setFile(FileAppender.java:290)
      at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:164)
      at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:216)
      at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:257)
      ............

      The templeton.log should have been written to the directory specified by $WEBHCAT_LOG_DIR

      The problem lies in the script webhcat_server.sh, it sets webhcat.log.dir.

      export HADOOP_OPTS="-Dwebhcat.log.dir=$WEBHCAT_LOG_DIR -Dlog4j.configuration=$WEBHCAT_LOG4J"
      

      But the default log4j configuration is using templeton.log.dir

      Attachments

        1. HCATALOG-588.1.patch
          1 kB
          Thejas Nair

        Activity

          People

            thejas Thejas Nair
            thejas Thejas Nair
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: