hive常见错误

1.查找hive的查询报错在hive的日志中。找hive的日志一般在hive的安装目录的conf中有个log的配置文件可以找到日志的位置。一般默认为/tmp/用户名/hive.log

2.常见的错误

java.io.IOException: Connection reset by peer

问题描述:hive 查询卡死,无法执行hive的命令

错误信息:

2013-03-2212:54:43,946 WARN  zookeeper.ClientCnxn(ClientCnxn.java:run(1089)) - Session 0x0 for serverhostname/***.***.***.***:2181, unexpected error, closing socket connection andattempting reconnect
java.io.IOException: Connection reset by peer
        atsun.nio.ch.FileDispatcher.read0(Native Method)
        atsun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:21)
        atsun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:233)
        atsun.nio.ch.IOUtil.read(IOUtil.java:200)
        atsun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:236)
        atorg.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:68)
        atorg.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:355)
        atorg.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068)
进一步确认可以查看zk的日志还有netstat -nap  | grep 2181|wc -l

解决办法:

修改hive-site.xml中的配置

<property>
 <name>hive.server2.thrift.min.worker.threads</name>
  <value>5</value>
  <description>Minimum number ofThrift workerthreads</description>
</property>
<property>
 <name>hive.server2.thrift.max.worker.threads</name>
 <value>100</value>
  <description>Maximum number ofThrift worker threads</description>
</property>

修改zoo.cfg中的配置

#Limits the number of concurrent connections (at the socket level) that a singleclient, identified by IP address
maxClientCnxns=200
# The minimum session timeout in milliseconds that the server will allow theclient to negotiate
minSessionTimeout=1000
# The maximum session timeout in milliseconds that the server will allow theclient to negotiate
maxSessionTimeout=60000

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值