zoukankan      html  css  js  c++  java
  • beeline链接hive报错

    看问题:beeline连接hiveserver2报错。连接串:hive  --service beeline -u jdbc:hive2://localhost:10000/hive

    错误:Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000/hive: Failed to open new session: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User: xxx  is not allowed to impersonate anonymous (state=08S01,code=0)

    解决方式:在hadoop的配置文件core-site.xml增加如下配置,重启hdfs,其中“xxx”是连接beeline的用户,将“xxx”替换成自己的用户名即可

    <property>
        <name>hadoop.proxyuser.xxx.hosts</name>
        <value>*</value>
    </property>
    <property>
        <name>hadoop.proxyuser.xxx.groups</name>
        <value>*</value>
    </property>
    
    <property>
        <name>hadoop.proxyuser.xxx.hosts</name>
        <value>*</value>
    </property>
    <property>
        <name>hadoop.proxyuser.xxx.groups</name>
        <value>*</value>
    </property>
    

      

    “*”表示可通过超级代理“xxx”操作hadoop的用户、用户组和主机

  • 相关阅读:
    笔记-归并排序
    Repeated Substring Pattern
    Assign Cookies
    Number of Boomerangs
    Paint Fence
    Path Sum III
    Valid Word Square
    Sum of Two Integers
    Find All Numbers Disappeared in an Array
    First Unique Character in a String
  • 原文地址:https://www.cnblogs.com/kisf/p/11679303.html
Copyright © 2011-2022 走看看