Thejas M Nair created HCATALOG-588:
--------------------------------------
Summary: Webhcat server wouldn't start as it is unable to write
templeton.log
Key: HCATALOG-588
URL: https://issues.apache.org/jira/browse/HCATALOG-588
Project: HCatalog
Issue Type: Bug
Components: webhcat-svr
Reporter: Thejas M Nair
Assignee: Thejas M Nair
Fix For: 0.5
Attachments: HCATALOG-588.1.patch
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.
{code}
export HADOOP_OPTS="-Dwebhcat.log.dir=$WEBHCAT_LOG_DIR
-Dlog4j.configuration=$WEBHCAT_LOG4J"
{code}
But the default log4j configuration is using templeton.log.dir
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira