HIVE2 Error: Failed to open new session: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteExc

来源:互联网 发布:知乎周刊合集 编辑:程序博客网 时间:2024/06/05 09:16
LF4J: 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://localhost:10000/default
Enter username for jdbc:hive2://localhost:10000/default: root
Enter password for jdbc:hive2://localhost:10000/default: ******

Error: 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=,code=0)


解决方案:在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>

0 0