一般的话,原因是你在spring中把jedis客户端配置成了单例模式(singleton),所以当在极短时间内,有多个请求连续发送过来时,jedis就会报错,说一个连接还没结束。

所以正确的配置是,将jedis配置成原型模式,每一次注入都产生一个新对象。

<!-- redis客户端 --><bean name="redis" class="redis.clients.jedis.Jedis" scope="prototype" ><constructor-arg name="host"><value>127.0.0.1</value></constructor-arg><constructor-arg name="port"><value type="int">6379</value></constructor-arg></bean>

上面的代码中,增加了scope="prototype"


参考:
Unexpected end of stream

看 “dbubenheim ”回到部分

redis报错:jedis connection exception unexpected end of stream相关推荐

  1. 使用客户端jedis时报错Could not get a resource from the pool 以及使用Spring Data Redis报错解决方法

    一.Jedis 报错 今天在使用jedis时,一直报错 Could not get a resource from the pool 在网上找了好多解决的方法,并且找了半天错误,才发现是我的启动方式有 ...

  2. 【Exception】Navicat连接Oracle闪退 Navicat连接Oracle 报错:connection to server failed,probable Oracle Net admi

    [Exception]Navicat连接Oracle闪退 Navicat连接Oracle 报错:connection to server failed,probable Oracle Net admi ...

  3. 阿里云 java程序 链接redis 报错 : IO Error: Connection reset

    阿里云 java程序 链接redis 报错 : IO Error: Connection reset 报错内容 2018-03-07 17:33:41.224 ERROR [main][Worker. ...

  4. 03-Redis客户端连接Redis服务器(redis.conf 文件配置没有生效导致redis运行报错Error: Connection reset by peer)

    参考此链接配置 redis.conf,然后本文章才能继续操作 EditPlus连接Centos7修改Redis配置文件(建议FinalShell修改更加方便)https://blog.csdn.net ...

  5. 解决Redis报错Redis is configured to save RDB snapshots, but it is currently not able to persist on disk

    Redis报错信息 在Spring Boot中集成Redis客户之后,进行数据操作,发现报如下错误: org.springframework.data.redis.RedisSystemExcepti ...

  6. Celery 启动报错 can_read() got an unexpected keyword argument timeout

    问题: Celery 启动报错 can_read() got an unexpected keyword argument timeout 方案:更改redis版本和celery版本,我使用下面的ce ...

  7. SpringBoot 整合Redis报错:NoClassDefFoundError: redis/clients/util/SafeEncoder

    QUESTION:SpringBoot 整合Redis报错:NoClassDefFoundError: redis/clients/util/SafeEncoder? ANSWER: 这种情况是版本不 ...

  8. 解决Redis报错:MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist

    解决Redis报错:MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on ...

  9. 一次redis连接配置修改引发的redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.异常

    一次redis连接配置修改引发的redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.异常 ...

最新文章

  1. Python Module_pdb_DEBUG 方法
  2. HDU2102 A计划
  3. spring 使用XML配置开发Spring AOP
  4. 6个方便的Git Bash脚本
  5. 感想2-对于组件化的一些思考
  6. php常用技术与thinkphp5,thinkPHP5框架路由常用知识点汇总
  7. teamviewer开通防火墙策略
  8. Kettle构建Hadoop ETL实践(一):ETL与Kettle
  9. 未能在sysindexes中找到数据库ID11中对象ID1的索引ID1对应的行,请对sysindexes运行
  10. php AES加解密
  11. speedoffice被隐藏的工作表如何取消隐藏
  12. 【C语言】剖析函数递归(3)
  13. css 三角角标样式
  14. 经典!沐风老师3DMAX建模实例系列教程上线啦。。。
  15. 【Cesium】加载互联网地图服务——天地图
  16. 公司用户画像项目总结
  17. css 动画时钟 时分秒
  18. pytorch,torch,torchvision的gpu版本安装避坑
  19. AppTransition
  20. TSP-爬山算法求解

热门文章

  1. IntelliJ IDEA 控制台最大化
  2. promise简单封装ajax 完美嵌套多个ajax请求
  3. centos使用git安装nvm
  4. mongoose 分页查询
  5. web学习2--理解MVC及快速入门
  6. sql的子查询超级慢-子查询酿的祸
  7. Java中BigDecimal的8种舍入模式
  8. spingboot 集成swagger2
  9. (四)Neo4j删除数据需要注意的问题
  10. 华为畅享8plus停产了吗_华为畅享8Plus