无法使用beeline连接到hive,用户root无法模仿匿名(Cannot connect to hive using beeline, user root cannot impersonate a

编程入门 行业动态 更新时间:2024-10-28 08:27:56
无法使用beeline连接到hive,用户root无法模仿匿名(Cannot connect to hive using beeline, user root cannot impersonate anonymous)

我正在尝试使用!connect jdbc:hive2://localhost:10000连接到hive !connect jdbc:hive2://localhost:10000并且我被要求输入用户名和密码


Connecting to jdbc:hive2://localhost:10000' Enter username for jdbc:hive2://localhost:10000: Enter password for jdbc:hive2://localhost: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 anonymous (state=,code=0)我的设置是ubuntu中的单节点hadoop集群。 我可以确认服务已启动并运行,包括hadoop和hiveserver2

问题是,这些用户名和密码是什么,我被问到,在哪里可以找到它们或设置它们?

提前致谢

I'm trying to connect to hive using beeline !connect jdbc:hive2://localhost:10000 and I'm being asked for a username and password


Connecting to jdbc:hive2://localhost:10000' Enter username for jdbc:hive2://localhost:10000: Enter password for jdbc:hive2://localhost:10000:


As I don't know what username or password I'm supposed to type in I'm leaving it empty which causes the error: 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 anonymous (state=,code=0) My setup is a single node hadoop cluster in ubuntu. I can confirm that the services are up and running, both hadoop and hiveserver2

The question is , what are these username and password I'm being asked, where can I find them or set them?

Thanks in advance

最满意答案

您应该提供有权访问HDFS和Hive服务(运行HiveServer2的user )的有效username和password 。 对于您的设置,安装Hadoop和Hive的用户将是超级用户。

beeline使用这些凭据来启动与HiveServer2的连接。

并在core-site.xml添加这些属性

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

添加这些属性后重新启动服务。

You should provide a valid username and password that has privileges to access the HDFS and Hive Services (user running HiveServer2). For your setup, the user in which Hadoop and Hive are installed would be the superuser.

These credentials will be used by beeline to initiate a connection with HiveServer2.

And, add these properties in core-site.xml

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

Restart services after adding these properties.

更多推荐

本文发布于:2023-07-26 02:18:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1269631.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:连接到   用户   hive   beeline   root

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!