redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
来源:互联网 发布:出国读研211985知乎 编辑:程序博客网 时间:2024/05/04 10:34
1、错误描述
redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the poolat redis.clients.util.Pool.getResource(Pool.java:22)at core.security.RedisManager.saveSession(RedisManager.java:46)at core.security.RedisSessionDAO.saveSession(RedisSessionDAO.java:75)at core.security.RedisSessionDAO.doUpdate(RedisSessionDAO.java:58)at org.apache.shiro.session.mgt.eis.CachingSessionDAO.update(CachingSessionDAO.java:277)at org.apache.shiro.session.mgt.DefaultSessionManager.onChange(DefaultSessionManager.java:212)at org.apache.shiro.session.mgt.AbstractNativeSessionManager.touch(AbstractNativeSessionManager.java:193)at org.apache.shiro.session.mgt.DelegatingSession.touch(DelegatingSession.java:120)at org.apache.shiro.session.ProxiedSession.touch(ProxiedSession.java:100)at org.apache.shiro.web.servlet.AbstractShiroFilter.updateSessionLastAccessTime(AbstractShiroFilter.java:315)at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:364)at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2517)at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2506)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)at java.lang.Thread.run(Thread.java:745)Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: connect timed outat redis.clients.jedis.Connection.connect(Connection.java:134)at redis.clients.jedis.BinaryClient.connect(BinaryClient.java:69)at redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1665)at redis.clients.jedis.JedisPool$JedisFactory.makeObject(JedisPool.java:72)at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1148)at redis.clients.util.Pool.getResource(Pool.java:20)... 38 moreCaused by: java.net.SocketTimeoutException: connect timed outat java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)at java.net.Socket.connect(Socket.java:579)at redis.clients.jedis.Connection.connect(Connection.java:129)... 43 more
2、错误原因
由错误提示可知,是redis无法连接,导致报错
3、解决办法
(1)检查网络,确保网络正常连接
(2)重新启动服务器,连接redis
0 1
- redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
- redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
- redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
- redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
- redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
- redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
- redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
- redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
- 、redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
- 异常:redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
- redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resourc
- redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resourc
- redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resourc
- redis JedisConnectionException: Could not get a resource from the pool
- exceptions.JedisConnectionException: Could not get a resource from the pool at org.springframework.
- redis提示Could not get a resource from the pool(jedis连接池配置)
- 报错JedisConnectionException: Could not get a resource from the pool
- Redis:Could not get a resource from the pool
- 在计算机中找不到mysql服务,解决方法是这个
- Oracle ORA-00903:表名无效
- JS: 文件引入
- html5根据不同的宽度加载不同的图片
- 微信小程序入门三: 简易form、本地存储
- redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
- ACM硬币问题
- 为什么65535是极值
- java代码实现年会座位的随机分配
- 集合转换成数组时类型向下转型的问题
- Android微信支付只能调起一次的问题
- 菜鸡的从零开始的web笔记-标签
- Google 超分辨率技术 RAISR:模糊图片瞬间变清晰,运算速度快十倍
- webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)