beeline启动时,错误 User: root is not allowed to impersonate root

错误:

beeline>!connect jdbc:hive2://192.168.33.01:10000 root root
Connecting to jdbc:hive2://192.168.33.01:10000
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的core-site.xml中添加以下内容 

  1. #(虚拟机的登录用户)“root”可以代理所有主机上的所有用户
  2. <property>
  3. <name>hadoop.proxyuser.root.hosts</name>
  4. <value>*</value>
  5. </property>
  6. <property>
  7. <name>hadoop.proxyuser.root.groups</name>
  8. <value>*</value>
  9. </property>

原文地址:https://www.cnblogs.com/liulala2017/p/11461260.html