今天安装了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

 

hive 不同用户 权限设置 出错处理的更多相关文章

  1. linux普通用户权限设置为超级用户权限方法、sudo不用登陆密码

    以用户zato为例 普通用户权限设置为超级用户权限 进入有超级用户权限的账号 添加文件可写(w)权限 sudo chmod u+x /etc/sudoers 编辑/etc/sudoers文件 添加语句 ...

  2. day43 mysql 基本管理,[破解密码以及用户权限设置]以及慢日志查询配置

    配置文件:详细步骤, 1,找到mysql的安装包,然后打开后会看到一个my.ini命名的程序,把它拖拽到notepad++里面来打开,(应该是其他文本形式也可以打开,可以试一下),直接拖拽即可打开该文 ...

  3. Jenkins 开启用户注册机制及用户权限设置

    Jenkins 开启用户注册机制及用户权限设置   by:授客 QQ:1033553122 步骤 1.  系统管理-Configure Global Security 2.  设置

  4. mongodb副本集用户权限设置

     mongodb副本集用户权限设置  用户权限参考文章 一:先看看MongoDB中用户的角色说明 read :   数据库的只读权限,包括: aggregate,checkShardingIndex, ...

  5. Java基础91 mysql的用户权限设置问题

    1.概述 1)MySQL数据库中root用户具有最高的权限(超级用户),可以对任何数据库,任何表进行操作. 2)权限账户,只拥有部分权限(CRUD) .例如:只能操作某个数据库的某张表等等. 2.my ...

  6. 重置Mysql的root密码及用户权限设置

     一.重置Mysql的root密码 方法一: 直接进入localhost/phpmyadmin修改用户root的权限,设置密码: 方法二: 进入mysql控制台:mysql->use mysql ...

  7. mysql用户权限设置

    1.创建新用户 通过root用户登录之后创建 >> grant all privileges on *.* to testuser@localhost identified by &quo ...

  8. mysql 用户权限设置【转】

    在Linux下phpStudy集成开发环境中,要先进入mysql下bin目录,执行mysql ./mysql -u root -p 1.创建新用户 通过root用户登录之后创建 >> gr ...

  9. mysql用户权限设置,远程访问设置、设置固定ip远程访问,设置root用户不能远程访问mysql数据库

    关于mysql的用户管理,笔记   1.创建新用户 通过root用户登录之后创建 >> grant all privileges on *.* to testuser@localhost ...

随机推荐

  1. C# 文件下载类

    using System; using System.Net; using System.IO; using System.Text; using System.Web; using System.W ...

  2. js 模拟QQ聊天窗口图片播放效果(带滚轮缩放)

    页面效果如下: 完整代码如下: <!DOCTYPE html> <html> <head> <title>Test</title> < ...

  3. 让Xcode Lua 语法高亮

    本人不太喜欢用code ide 还是喜欢XCODE的风格 1.让Xcode支援Lua语法高亮(Syntax Highlighting) 1. 下载https://github.com/breinhar ...

  4. leetcode[94] Unique Binary Search Trees

    给定n,那么从1,2,3...n总共可以构成多少种二叉查找数呢.例如给定3 Given n = 3, there are a total of 5 unique BST's. 1 3 3 2 1 \ ...

  5. ps教程--折纸效果

    原文:http://www.fevte.com/tutorial-16947-1.html

  6. helloWord

    helloWord!!! 在cnblogs安家了

  7. Map和List

    Map和List 当把Map中的key-value对当成单独的集合元素来对待时,Map和Set就统一起来了. Map集合是一个关联数组,它包含两组值:一组是所有key组成的集合,因为Map集合的key ...

  8. Build FFmpeg for iOS

    FFmpeg Build Instructions MAC 10.8 or better Copy ffmpeg-2.0.tar.bz2 (https://ffmpeg.org/releases/ff ...

  9. [RM 状态机详解4] RMNode状态机详解

    摘要 RMNode状态机是ResourceManager的四个状态机(RMApp,RMAppAttempt,RMContainer,RMNode)中最简单的一个,状态机如图1所示.RMNode是Res ...

  10. Javascript:看 Javascript 规范,学 this 引用,你会懂的。

    目录 背景this待分析程序先看一个语言规范方法调用备注 背景返回目录 Javascript 的 this 是我的心病,多数情况下知道其运行结果,个别变态的场景下,就给不出解释了,昨天一次偶然的机遇让 ...