日常记录:Could not get a resource from the pool错误


在配置了一个新的redis 使用jedisPool.getResource();链接的时候出现Could not get a resource from the pool错误

日常记录:Could not get a resource from the pool错误
网上看到很多解决办法都是配置问题
日常记录:Could not get a resource from the pool错误
解决办法有直接添加一个配置
日常记录:Could not get a resource from the pool错误
但是我的问题不是这里找了很久,断点进去一步一步看发现是此处抛出的异常,但是这里根本看不出问题
日常记录:Could not get a resource from the pool错误
继续往里面走才发现抛出的是:Redis服务器没有设置密码,但客户端向其发送了AUTH(authentication,身份验证)请求。日常记录:Could not get a resource from the pool错误
那么问题找到了:我之前的配置以为没有密码 那么就再配置文件中写一个空
日常记录:Could not get a resource from the pool错误
日常记录:Could not get a resource from the pool错误
取得时候就会出现问题

要么直接就不写 直接注释掉 或者直接赋值为null
日常记录:Could not get a resource from the pool错误
那么JedisPool构造
日常记录:Could not get a resource from the pool错误
日常记录:Could not get a resource from the pool错误
问题就解决了

相关文章:

  • 2021-12-02
  • 2021-10-05
  • 2021-12-14
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-22
  • 2021-09-29
相关资源
相似解决方案