欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 教育 > 培训 > Ranger Hive Service连接测试失败问题解决

Ranger Hive Service连接测试失败问题解决

2025/2/22 16:39:29 来源:https://blog.csdn.net/weixin_46161645/article/details/145523085  浏览:    关键词:Ranger Hive Service连接测试失败问题解决

个人博客地址:Ranger Hive Service连接测试失败问题解决 | 一张假钞的真实世界

异常信息如下:

org.apache.ranger.plugin.client.HadoopException: Unable to connect to Hive Thrift Server instance..
Unable to connect to Hive Thrift Server instance..
Could not open client transport with JDBC Uri: jdbc:hive2://192.168.72.212:10000: Could not establish connection to jdbc:hive2://192.168.72.212:10000: Required field 'client_protocol' is unset! Struct:TOpenSessionReq(client_protocol:null, configuration:{set:hiveconf:hive.server2.thrift.resultset.default.fetch.size=1000, use:database=default}).
Could not establish connection to jdbc:hive2://192.168.72.212:10000: Required field 'client_protocol' is unset! Struct:TOpenSessionReq(client_protocol:null, configuration:{set:hiveconf:hive.server2.thrift.resultset.default.fetch.size=1000, use:database=default}).
Required field 'client_protocol' is unset! Struct:TOpenSessionReq(client_protocol:null, configuration:{set:hiveconf:hive.server2.thrift.resultset.default.fetch.size=1000, use:database=default}). 

百度后是因为Hive版本不匹配导致的。我的测试环境Hive版本是2.1.1,通过下面的命令发现确实版本不一致:

# find . -name "*hive*"
./ews/webapp/WEB-INF/classes/ranger-plugins/hive
./ews/webapp/WEB-INF/classes/ranger-plugins/hive/ranger-hive-plugin-1.2.0.jar
./ews/webapp/WEB-INF/classes/ranger-plugins/hive/hive-common-2.3.2.jar
./ews/webapp/WEB-INF/classes/ranger-plugins/hive/hive-service-2.3.2.jar
./ews/webapp/WEB-INF/classes/ranger-plugins/hive/hive-exec-2.3.2.jar
./ews/webapp/WEB-INF/classes/ranger-plugins/hive/hive-metastore-2.3.2.jar
./ews/webapp/WEB-INF/classes/ranger-plugins/hive/hive-jdbc-2.3.2.jar

问题解决方法就显而易见了。

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

热搜词