redis JedisConnectionException: Could not get a resource from the pool

來源:互聯網
上載者:User

標籤:java   redis   防火牆   jedis   exception   

HTTP Status 500 - Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool

type Exception reportmessage Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pooldescription The server encountered an internal error that prevented it from fulfilling this request.exceptionorg.springframework.data.redis.RedisConnectionFailureException: Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the poolorg.springframework.data.redis.connection.jedis.JedisConnectionFactory.fetchJedisConnector(JedisConnectionFactory.java:97)org.springframework.data.redis.connection.jedis.JedisConnectionFactory.getConnection(JedisConnectionFactory.java:143)org.springframework.data.redis.connection.jedis.JedisConnectionFactory.getConnection(JedisConnectionFactory.java:41)org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:128)org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:91)org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:78)org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:177)org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:152)org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:84)org.springframework.data.redis.core.DefaultValueOperations.get(DefaultValueOperations.java:43)org.springframework.data.redis.core.DefaultBoundValueOperations.get(DefaultBoundValueOperations.java:41)com.auth.provider.impl.DefaultRememberMeProvider.findRememberMeById(DefaultRememberMeProvider.java:47)com.auth.AbstractSessionManager.getRememberMe(AbstractSessionManager.java:254)com.auth.filter.AuthenticationFilter.doFilterInternal(AuthenticationFilter.java:84)org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)root causeredis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the poolredis.clients.util.Pool.getResource(Pool.java:42)org.springframework.data.redis.connection.jedis.JedisConnectionFactory.fetchJedisConnector(JedisConnectionFactory.java:90)org.springframework.data.redis.connection.jedis.JedisConnectionFactory.getConnection(JedisConnectionFactory.java:143)org.springframework.data.redis.connection.jedis.JedisConnectionFactory.getConnection(JedisConnectionFactory.java:41)org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:128)org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:91)org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:78)org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:177)org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:152)org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:84)org.springframework.data.redis.core.DefaultValueOperations.get(DefaultValueOperations.java:43)org.springframework.data.redis.core.DefaultBoundValueOperations.get(DefaultBoundValueOperations.java:41)com.auth.provider.impl.DefaultRememberMeProvider.findRememberMeById(DefaultRememberMeProvider.java:47)com.auth.AbstractSessionManager.getRememberMe(AbstractSessionManager.java:254)com.auth.filter.AuthenticationFilter.doFilterInternal(AuthenticationFilter.java:84)org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)root causeredis.clients.jedis.exceptions.JedisConnectionException: java.net.ConnectException: Connection refused: connectredis.clients.jedis.Connection.connect(Connection.java:142)redis.clients.jedis.BinaryClient.connect(BinaryClient.java:75)redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1724)redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:65)org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:836)org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:434)org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:361)redis.clients.util.Pool.getResource(Pool.java:40)org.springframework.data.redis.connection.jedis.JedisConnectionFactory.fetchJedisConnector(JedisConnectionFactory.java:90)org.springframework.data.redis.connection.jedis.JedisConnectionFactory.getConnection(JedisConnectionFactory.java:143)org.springframework.data.redis.connection.jedis.JedisConnectionFactory.getConnection(JedisConnectionFactory.java:41)org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:128)org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:91)org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:78)org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:177)org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:152)org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:84)org.springframework.data.redis.core.DefaultValueOperations.get(DefaultValueOperations.java:43)org.springframework.data.redis.core.DefaultBoundValueOperations.get(DefaultBoundValueOperations.java:41)com.auth.provider.impl.DefaultRememberMeProvider.findRememberMeById(DefaultRememberMeProvider.java:47)com.auth.AbstractSessionManager.getRememberMe(AbstractSessionManager.java:254)com.auth.filter.AuthenticationFilter.doFilterInternal(AuthenticationFilter.java:84)org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)root causejava.net.ConnectException: Connection refused: connectjava.net.DualStackPlainSocketImpl.waitForConnect(Native Method)java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)java.net.AbstractPlainSocketImpl.connect(Unknown Source)java.net.PlainSocketImpl.connect(Unknown Source)java.net.SocksSocketImpl.connect(Unknown Source)java.net.Socket.connect(Unknown Source)redis.clients.jedis.Connection.connect(Connection.java:137)redis.clients.jedis.BinaryClient.connect(BinaryClient.java:75)redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1724)redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:65)org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:836)org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:434)org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:361)redis.clients.util.Pool.getResource(Pool.java:40)org.springframework.data.redis.connection.jedis.JedisConnectionFactory.fetchJedisConnector(JedisConnectionFactory.java:90)org.springframework.data.redis.connection.jedis.JedisConnectionFactory.getConnection(JedisConnectionFactory.java:143)org.springframework.data.redis.connection.jedis.JedisConnectionFactory.getConnection(JedisConnectionFactory.java:41)org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:128)org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:91)org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:78)org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:177)org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:152)org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:84)org.springframework.data.redis.core.DefaultValueOperations.get(DefaultValueOperations.java:43)org.springframework.data.redis.core.DefaultBoundValueOperations.get(DefaultBoundValueOperations.java:41)com.auth.provider.impl.DefaultRememberMeProvider.findRememberMeById(DefaultRememberMeProvider.java:47)com.auth.AbstractSessionManager.getRememberMe(AbstractSessionManager.java:254)com.auth.filter.AuthenticationFilter.doFilterInternal(AuthenticationFilter.java:84)org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)note The full stack trace of the root cause is available in the Apache Tomcat/7.0.54 logs.Apache Tomcat/7.0.54
產生此錯誤的原因通常是Redis沒有啟動,或者是由於防火牆等原因無法串連到Redis;

redis JedisConnectionException: Could not get a resource from the pool

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.