最近新搭建了redis 服务,版本是redis5.08,在我使用JedisPoolConfig 去连接时出现以下异常

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ssoConfig' defined in URL [jar:file:/wls/apps/sso-server/sso-server-0.0.1-SNAPSHOT.jar!/BOOT-INF/classes!/com/sso/config/SsoConfig.class]: Invocation of init method failed; nested exception is redis.clients.jedis.exceptions.JedisExhaustedPoolException: Could not get a resource since the pool is exhaustedat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:882)at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878)at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)at com.sso.SsoServerApplication.main(SsoServerApplication.java:12)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)at org.springframework.boot.loader.Launcher.launch(Launcher.java:51)at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52)
Caused by: redis.clients.jedis.exceptions.JedisExhaustedPoolException: Could not get a resource since the pool is exhaustedat redis.clients.jedis.util.Pool.getResource(Pool.java:53)at redis.clients.jedis.ShardedJedisPool.getResource(ShardedJedisPool.java:36)at com.sso.utils.JedisUtil.getInstance(JedisUtil.java:97)at com.sso.utils.JedisUtil.init(JedisUtil.java:31)

通过查询redis.conf 配置查询发现,在安装的时候默认只接受来自同一台计算机上运行的客户端的连接而且还启用的了保护模式


解决方法:
1、bind 127.0.0.1 注释掉、
2、protected-mode 改成 no

解决redis Could not get a resource since the pool is exhausted 问题相关推荐

  1. 记一次线上redis报错(JedisExhaustedPoolException: Could not get a resource since the pool is exhausted)

    错误详情 redis.clients.jedis.exceptions.JedisExhaustedPoolException: Could not get a resource since the ...

  2. redis中 Could not get a resource from the pool 异常解决

    描述 这个错误产生的前提是这样的,将数据存入redis(新安装的)中,在通过连接池获取jedis实例时,产生如下错误( Could not get a resource from the pool). ...

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

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

  4. 解决Redis问题:JedisConnectionException: Could not get a resource from the pool

    1.问题描述: redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the p ...

  5. redis使用中经常出现 Could not get a resource from the pool 异常,解决办法总结

    背景: 最近使用jedis(redis)开发一项功能,查阅日志发现,服务运行一段时间之后,就会出现 redis.clients.jedis.exceptions.JedisException: Cou ...

  6. 使用redis做缓存,遇到Could not return the resource to the pool异常怎么办呐!

    使用redis做缓存,短短几天就遇到两次redis.clients.jedis.exceptions.JedisException: Could not return the resource to ...

  7. Could not get a resource from the pool 错误解决

    Could not get a resource from the pool 错误解决 错误信息:Could not get a resource from the pool 可能造成错误原因: 1 ...

  8. 解决Could not get a resource from the pool 异常问题

    在项目中实现数据库查询内容,用到redis的时候出现 Could not get a resource from the pool ,试了挺多方法都不行,包括改最大.最小连接数maxIdle.maxI ...

  9. springboot报错:Could not get a resource from the pool redis.clients.jedis.exceptions.JedisConnection

    运行项目时报错: 2022-04-15 19:27:54.052 ERROR 9676 --- [nio-8181-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServl ...

最新文章

  1. 游戏运行时报0xc000007b错的解决办法
  2. shell实例第4讲:批量创建用户
  3. Linux下scp无密码上传 下载 文件 目录的方法
  4. [daily] 使用diff和patch打补丁
  5. WinCE上BINFS实现详解
  6. 开启算法编程之旅的准备工作——如何在Windows 上安装 Anaconda 和 PyCharm
  7. Day11多态部分-2 【1.2 多态的前提】
  8. 借助Fiddle使用不同版本的UI5库文件进行测试
  9. HDU 5741 Helter Skelter(构造法)
  10. glClearDepth
  11. eclipse问题_Alt+/不给提示,只补充代码问题的解决方案
  12. erlang安装_消息中间件(八)- RabbitMQ - 安装
  13. ZooKeeper 到底解决了什么问题?
  14. 2022年计算机二级考试Java语言程序设计模拟题及答案
  15. janusgraph源码分析1-下载编译启动
  16. lg v35 thinkq刷韩版android9.0教程
  17. 怎样找计算机物理地址,怎么查询电脑物理地址
  18. 计算机管理的磁盘管理简单卷,win7磁盘管理分区后无法新建简单卷怎么解决
  19. 使用C#从图片文件生成图标ICON文件(附源文件)
  20. android 电池电量广播,Android查看电池电量的方法(基于BroadcastReceiver)

热门文章

  1. 识别各种安全设备及当今体现形态-区别UTM与NGFW
  2. Ubuntu18.04安装NVIDIA 显卡驱动(GTX 1060)
  3. 【分享】李笑来采访路金波老师的录音
  4. ios 视频选择封面功能
  5. 利用python获取股票折线图_python绘制香农的投资组合折线图
  6. eclipse java swt_Eclipse swt开发环境搭建
  7. 西游记中唐僧师徒的不同性格
  8. 定值保险计算举例_保险中生命表的计算例题 定值保险和不定值保险计算例题...
  9. 【C++】加油站加油
  10. Verilog语言基础