• redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.


    异常信息:

    java.lang.RuntimeException: redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.
    at backtype.storm.utils.DisruptorQueue.consumeBatchToCursor(DisruptorQueue.java:128)
    at backtype.storm.utils.DisruptorQueue.consumeBatchWhenAvailable(DisruptorQueue.java:99)
    at backtype.storm.disruptor$consume_batch_when_available.invoke(disruptor.clj:80)
    at backtype.storm.daemon.executor$fn__6214$fn__6227$fn__6278.invoke(executor.clj:808)
    at backtype.storm.util$async_loop$fn__543.invoke(util.clj:475) at clojure.lang.AFn.run(AFn.java:22)
    at java.lang.Thread.run(Thread.java:745)
    Caused by: redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.
    at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:198)
    at redis.clients.util.RedisInputStream.readByte(RedisInputStream.java:40)
    at redis.clients.jedis.Protocol.process(Protocol.java:141)
    at redis.clients.jedis.Protocol.read(Protocol.java:205)
    at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:297)
    at redis.clients.jedis.Connection.getBinaryMultiBulkReply(Connection.java:233)
    at redis.clients.jedis.Jedis.keys(Jedis.java:194)
    at com.jk.utils.RedisUtils.keys(RedisUtils.java:174)
    at com.jk.bolt.IPSumBolt.execute(IPSumBolt.java:47) (异常代码:Set<String> keys = jedis.keys("2017"))
    at backtype.storm.daemon.executor$fn__6214$tuple_action_fn__6216.invoke(executor.clj:670)
    at backtype.storm.daemon.executor$mk_task_receiver$fn__6137.invoke(executor.clj:426)
    at backtype.storm.disruptor$clojure_handler$reify__5713.onEvent(disruptor.clj:58)
    at backtype.storm.utils.DisruptorQueue.consumeBatchToCursor(DisruptorQueue.java:125) ... 6 more

    解决方案:

      首先网上有很多,比如客户端缓冲区大小,但是试过之后依然没有解决。

      我们用的是两台Redis服务器节点,使用Codis代理搭建的Redis集群服务,最后经一一排查代码,发现是Codis代理不支持redis keys这种模糊查询操作,改用 scan操作发现codis 貌似也不支持。

  • 相关阅读:
    How To Monitor Remote Linux Host using Nagios 3.0
    Nagios的安装配置与应用之五监控远程Linux服务器
    Unix/Linux下如何使用Vi编辑器
    Nagios Apache报Internal Server Error错误的解决方法
    EMQ X 插件持久化系列 (五)MySQL MQTT 数据存储
    MQTT 5.0
    发布说明
    EMQ X 插件持久化系列 (四)PostgreSQL 数据持久化
    EMQ X 规则引擎系列(十四)- 桥接消息到 Pulsar
    如何使用 MQTT 报文实现发布订阅功能
  • 原文地址:https://www.cnblogs.com/louxindong/p/7063279.html
Copyright © 2020-2023  润新知