hiveserver2连接报错: User: root is not allowed to impersonate anonymous (state=08S01,code=0)

简介: 欢迎关注大数据和人工智能技术文章发布的微信公众号:清研学堂,在这里你可以学到夜白(作者笔名)精心整理的笔记,让我们每天进步一点点,让优秀成为一种习惯!使用HiveServer2运行时,启动好HiveServer后运行private static String url = "jdbc:hive2://192.

欢迎关注大数据和人工智能技术文章发布的微信公众号:清研学堂,在这里你可以学到夜白(作者笔名)精心整理的笔记,让我们每天进步一点点,让优秀成为一种习惯!

使用HiveServer2运行时,启动好HiveServer后运行

private static String url = "jdbc:hive2://192.168.213.132:10000/default"; 连接hiveserver2时
出现
java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): 
User root is not allowed to impersonate anonymous 错误。
  • 修改hadoop 配置文件 etc/hadoop/core-site.xml,加入如下配置项
<property>
    <name>hadoop.proxyuser.root.hosts</name>
    <value>*</value>
</property>
<property>
    <name>hadoop.proxyuser.root.groups</name>
    <value>*</value>
</property>

    hadoop.proxyuser.root.hosts配置项名称中root部分为报错User:* 中的用户名部分

    例如User: zhaoshb is not allowed to impersonate anonymous则需要将xml变更为如下格式

<property>
    <name>hadoop.proxyuser.zhaoshb.hosts</name>
    <value>*</value>
</property>
<property>
    <name>hadoop.proxyuser.zhaoshb.groups</name>
    <value>*</value>
</property>
最后重启hadoop即可,大功告成!
目录
相关文章
|
1月前
|
网络协议 Linux
搭建FTP报错:Job for vsftpd.service failed because the control process exited with error code. See
搭建FTP报错:Job for vsftpd.service failed because the control process exited with error code. See
87 3
|
4月前
|
关系型数据库 MySQL 数据库
mysql 中登录报错:ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)ERROR
mysql 中登录报错:ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)ERROR
|
5月前
|
关系型数据库 MySQL 数据库
【已解决】ERROR 1045 - Access denied for user ‘root‘@‘localhost‘ (using password: YES)
【已解决】ERROR 1045 - Access denied for user ‘root‘@‘localhost‘ (using password: YES)
|
6月前
|
关系型数据库 MySQL 数据库
MySQL 启动 登录报错Job for mysqld.service failed because the control process exited with error code. See
MySQL 启动 登录报错Job for mysqld.service failed because the control process exited with error code. See
111 1
|
网络安全 开发工具
【解决方案】A session ended very soon after starting. Check that the command in profile “XXX” is correct.
【解决方案】A session ended very soon after starting. Check that the command in profile “XXX” is correct.
1025 0
【解决方案】A session ended very soon after starting. Check that the command in profile “XXX” is correct.
|
关系型数据库 MySQL 数据库
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES/NO)
初次安装mysql,net start mysql,然后输入mysql -u root -p, 出现enter password,我直接点击回车,结果出现如果下错误: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)。
4347 1
|
分布式计算 关系型数据库 Hadoop
         User root is not allowed to impersonate anonymous                     
错误: bymain is not allowed to impersonate hadoop(或者          User root is not allowed to impersonate anonymou...
1752 0
|
关系型数据库 MySQL 数据安全/隐私保护
ERROR 1142 (42000): GRANT command denied to user ** 或 ERROR 1045 (28000): Access denied for user '**'@'localhost' (using password: YES)
ERROR 1142 (42000): GRANT command denied to user ** 或 ERROR 1045 (28000): Access denied for user '**'@'localhost' (using password: YES)
811 0
|
XML 分布式计算 Hadoop
hiveserver2连接报错: User: root is not allowed to impersonate anonymous (state=08S01,code=0)
hiveserver2连接报错: User: root is not allowed to impersonate anonymous (state=08S01,code=0)
772 0
|
SQL Windows
Unable to determine if the owner (Domain\UserName) of job JOB_NAME has server access
早上巡检的的时候,发现一数据库的作业报如下错误(作业名等敏感信息已经替换),该作业的OWNER为一个域账号: JOB RUN: 'JOB_NAME' was run on 2016-6-1 at 7:00:00 DURATION: 0 hours, 0 minutes, 1 seconds STATUS: Failed MESSAGES: The job failed.
1431 0