datagrip 连接 hive 出现错误总结

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

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

红色的字体的字符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就可以了。

<property>
        <name>hive.server2.thrift.port</name>
        <value>10001</value>
    </property>

错误二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个服务没有起来就会报这个错误

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值