redis JedisConnectionException: Could not get a resource from the pool 的八种可能的原因

本文介绍了导致Redis JedisConnectionException: Could not get a resource from the pool错误的八种常见原因,包括Redis未启动、防火墙阻止连接、IP或端口错误、Jedis对象管理不当、Spring Boot项目缺少依赖、内存分配问题以及连接池中连接超时等,并提供了相应的解决策略。
摘要由CSDN通过智能技术生成

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 report

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

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.springframework.data.redis.RedisConnectionFailureException: Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
	org.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 cause

redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
	redis.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.Jedis
评论 35
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值