1,在hadoop core-site.xml设置错误

hadoop.proxyuser.zhang.hosts

*

hadoop.proxyuser.zhang.groups

*

红色的字体的字符zhang需要修改为本机的 机器名称

2,通过beeline 测试连接jdbc连接的时候出现如下错误

错误一:Unexpected end of file when reading from HS2 server. The root cause might be too many concurrent connections. Please ask the administrator to check the number of active connections, and adjust hive.server2.thrift.max.worker.threads if applicable. Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000: null (state=08S01,code=0)

这个错误 其实是表面的错误。实际错误需要到 hive 的 日志文件 ./hive/log/hive.log中查看真实的错误。我的真实错误是

org.apache.thrift.protocol.TProtocolException: Missing version in readMessageBegin, old client?

这个错误是我用了老的端口,我门只需要在 hive-site.xml 中的hiveserver2的端口从10000 改为10001就可以了。

hive.server2.thrift.port

10001

错误二Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000: java.net.ConnectException: Connection refused (Connection refused) (state=08S01,code=0) 

这个错误需要查看你的 hiveserver2 和 mestore 的服务是否起来了

ps -ef|grep metastore

ps -ef|grep hiveserver2

端口10001是否起来了

netstat -anlp | grep 10001

如果这2个服务没有起来就会报这个错误

相关文章

评论可见,请评论后查看内容,谢谢!!!
 您阅读本篇文章共花了: