Support Questions
Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.

Error starting Hive CLI

Expert Contributor

With the root login, I tried to start hive CLI but got the following error. In HDFS, there is no such path /user/root. I tried to add the folder but got the same permission denied error. So I wonder whether I am allowed to use Hive CLI in HDP. Any suggestions?

# hive
log4j:WARN No such property [maxFileSize] in org.apache.log4j.DailyRollingFileAppender.

Logging initialized using configuration in file:/etc/hive/2.6.5.1100-53/0/hive-log4j.properties
Exception in thread "main" java.lang.RuntimeException: org.apache.hadoop.security.AccessControlException: Permission denied: user=root, access=WRITE, inode="/user/root":hdfs:hdfs:drwxr-xr-x

Thanks.

2 REPLIES 2

Expert Contributor

@Haijin Li, Based on the exception it seems like the folder /user/root may not be present in HDFS.


You would want to sudo to hdfs and then run the below commands

su hdfs (or equivalent command)

hdfs dfs -mkdir -p /user/root

hdfs dfs -chown root /user/root

exit


Now launch the hivecli it should start up fine.

Expert Contributor

I reinstalled HDP and the problem went away.