赞
踩
- Error: Could not open client transport with JDBC Uri: jdbc:hive2://node1:10000/hive_metadata;user=hadoop: java.net.ConnectException: 拒绝连接 (Connection refused) (state=08S01,code=0)
- Beeline version 2.3.3 by Apache Hive
错误截图:
原因:hiveserver2增加了权限控制,需要在hadoop的配置文件中配置
解决方法:在hadoop的core-site.xml中添加如下内容,然后重启hadoop,再使用beeline连接即可
参考官网:
https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/Superusers.html
- <property>
- <name>hadoop.proxyuser.hadoop.hosts</name>
- <value>*</value>
- </property>
- <property>
- <name>hadoop.proxyuser.hadoop.groups</name>
- <value>*</value>
- </property>
再次启动:
注:这里的javaapidb是需要有这个库,不然会报错
beeline -u jdbc:hive2://node1:10000/javaapidb -n hadoop -p
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。