User: root is not allowed to impersonate root (state=08S01,code=0)
hive的客户端毗连服务使用metastore毗连hiveserver2没有出问题,而使用beeline毗连hiveserver2却出现如下问题
Error: Could not open client transport with JDBC Uri: jdbc:hive2://hadoop02:10000: Failed to open new session: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User: root is not allowed to impersonate root (state=08S01,code=0)
[root@hadoop01 lib]# beelinewhich: no hbase in (.:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/vim82/bin:/usr/local/myJdk/bin:/usr/local/myJdk/lib:/usr/local/myHadoop/bin:/usr/local/myHadoop/sbin:/usr/local/hive/bin:/usr/local/python-3.7.3/bin:/usr/local/zookeeper/bin:/root/bin)Beeline version 2.1.1 by Apache Hivebeeline> !connect jdbc:hive2://hadoop02:10000SLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in [jar:file:/usr/local/hive/lib/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J: Found binding in [jar:file:/usr/local/myHadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]Connecting to jdbc:hive2://hadoop02:10000Enter username for jdbc:hive2://hadoop02:10000: rootEnter password for jdbc:hive2://hadoop02:10000: ******20/12/29 10:45:45 [main]: WARN jdbc.HiveConnection: Failed to connect to hadoop02:10000Error: Could not open client transport with JDBC Uri: jdbc:hive2://hadoop02:10000: Failed to open new session: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User: root is not allowed to impersonate root (state=08S01,code=0)
[root@hadoop01 lib]# beelinewhich: no hbase in (.:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/vim82/bin:/usr/local/myJdk/bin:/usr/local/myJdk/lib:/usr/local/myHadoop/bin:/usr/local/myHadoop/sbin:/usr/local/hive/bin:/usr/local/python-3.7.3/bin:/usr/local/zookeeper/bin:/root/bin)Beeline version 2.1.1 by Apache Hivebeeline> !connect jdbc:hive2://hadoop02:10000SLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in [jar:file:/usr/local/hive/lib/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J: Found binding in [jar:file:/usr/local/myHadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]Connecting to jdbc:hive2://hadoop02:10000Enter username for jdbc:hive2://hadoop02:10000: rootEnter password for jdbc:hive2://hadoop02:10000: ******Connected to: Apache Hive (version 2.1.1)Driver: Hive JDBC (version 2.1.1)20/12/29 10:50:48 [main]: WARN jdbc.HiveConnection: Request to set autoCommit to false; Hive does not support autoCommit=false.Transaction isolation: TRANSACTION_REPEATABLE_READ0: jdbc:hive2://hadoop02:10000>