hive 不同用户 权限设置 出错处理
来源:互联网 发布:怎么管理mac下面的图标 编辑:程序博客网 时间:2024/06/15 23:53
今天安装了hive
在a账号安装的,一切正常
但是到其他账户下,报错
>show tables;
Error in metadata: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
以为是权限问题
查看log
Nested Throwables StackTrace:
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Could not create a validated object, cause: A read-only user or a user in a read-only database is not permitted to disable read-only mode on a connection.
后来的解决方案:一个老外的方案:
I had the same issue and resolved it by the following way. The issue is because of two possible reasons.
- Either, the user you logged in as (do 'whoami' ) does not havewrite access to the derby metastore database directory used by Hive.So, go to /var/lib/hive/metastore/metastore_db (this is the defaultin most cases) and verify if your user id has permissions by doing anls. In case your userid does not have permissions, you should ask the owner of the directory to grant write permissions to you. So,login as the owner/the super user and execute
cd /var/lib/hive/metastore/metastore_db
chmod a+rwx . --recursive
Be warned that this will give permissions to all users. Tweak r-w-x bits accordingly though.
- The other possible reason is that derby is a single user database. So, please clear the lock files by going to
cd /var/lib/hive/metastore/metastore_db
rm *.lck
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at org.apache.hadoop.ipc.RemoteException.instantiateException(RemoteException.java:90)
at org.apache.hadoop.ipc.RemoteException.unwrapRemoteException(RemoteException.java:57)
at org.apache.hadoop.hdfs.DFSClient.getFileInfo(DFSClient.java:1534)
at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:803)
at org.apache.hadoop.fs.FileSystem.exists(FileSystem.java:1332)
at org.apache.hadoop.mapreduce.JobSubmissionFiles.getStagingDir(JobSubmissionFiles.java:109)
at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:952)
at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:946)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1408)
at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:946)
at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:920)
at org.apache.hadoop.hive.ql.exec.ExecDriver.execute(ExecDriver.java:447)
at org.apache.hadoop.hive.ql.exec.MapRedTask.execute(MapRedTask.java:136)
at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:138)
at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:57)
at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1352)
at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1138)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:951)
at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:259)
at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:216)
at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:412)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:755)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:613)
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:601)
at org.apache.hadoop.util.RunJar.main(RunJar.java:208)
Caused by: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.AccessControlException): Permission denied: user=shen, access=EXECUTE, inode="/tmp/hadoop-mapred/mapred/staging"
原来还有一个文件要设置权限
解决方法:
hadoop fs -chmod 777 /tmp/hadoop-mapred/mapred/staging
- hive 不同用户 权限设置 出错处理
- hive 不同用户 权限设置 出错处理
- wingvs不同用户设置不同的访问权限方法
- 数据库可以为用户设置不同的权限
- Sql2008不同用户指定访问数据库的权限设置!
- weblogic 控制台设置不同权限用户(monitor deployer operter)
- Django 权限认证 编写 -- 根据不同的用户,设置不同的显示和访问权限
- Hive 中的权限设置
- hive权限设置
- WIN2000下CVS不同用户设置不同的访问权限方法
- WIN2000下CVS不同用户设置不同的访问权限方法
- hive权限设置 部分翻译
- hive-错误-处理解压文件gz出错
- SQL2008和SQL2000下为每个登录用户设置不同表的访问权限
- git在linux上的安装配置包括设置不同用户的权限
- XP设置不同用户对硬盘和文件夹的访问权限
- git在linux上的安装配置包括设置不同用户的权限
- elk模块x-pack简单替代,按照索引设置不同用户(nginx权限控制)
- 绑定数据如果后台有null,用三元运算符
- GDB --- linux调试工具介绍
- 移动硬盘打不开(不用格式化)修复方法
- akka之分发和路由
- leetcode_599. Minimum Index Sum of Two Lists ? 待解决
- hive 不同用户 权限设置 出错处理
- Win10系统下软件UI显示不完整解决方案
- vlc for android 不能全屏,或者画面不能铺满的问题。
- 二叉树的层序遍历 使用队列和不使用队列
- android和JS交互,相互调用方法传值。不使用第三方实现原生加载word、ppt、pdf文档
- Python学习之路6
- hdu 6242 Geometry Problem(随机化+三点求外接圆)
- Python学习之路7
- JVM二:JVM7、8详解