Hive启动hiveserver2报错:Could not open client transport with JDBC Uri解决方案

报错信息:

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

错误截图:

Hive启动hiveserver2报错:Could not open client transport with JDBC Uri解决方案_第1张图片

 

解决方案: 

原因:hiveserver2增加了权限控制,需要在hadoop的配置文件中配置 

解决方法:在hadoop的core-site.xml中添加如下内容,然后重启hadoop,再使用beeline连接即可

参考官网: 

https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/Superusers.html


    hadoop.proxyuser.hadoop.hosts
    *


    hadoop.proxyuser.hadoop.groups
    *

Hive启动hiveserver2报错:Could not open client transport with JDBC Uri解决方案_第2张图片 

再次启动:

注:这里的javaapidb是需要有这个库,不然会报错

beeline -u jdbc:hive2://node1:10000/javaapidb -n hadoop -p

 Hive启动hiveserver2报错:Could not open client transport with JDBC Uri解决方案_第3张图片

你可能感兴趣的:(hive)