org.springframework.data.redis.RedisConnectionFailureException: Unexpected end of stream.; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.

aichengxu.com | 3 months ago
  1. 0

    Error creating bean with name 'enableRedisKeyspaceNotificationsInitializer' - 爱程序网

    aichengxu.com | 3 months ago
    org.springframework.data.redis.RedisConnectionFailureException: Unexpected end of stream.; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.
  2. 0

    GitHub comment 12#47637889

    GitHub | 2 years ago | Elisabeth-Engel
    org.springframework.data.redis.RedisConnectionFailureException: It seems like server has closed the connection.; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: It seems like server has closed the connection.
  3. 0

    When Using *@EnableCaching(mode = AdviceMode.ASPECTJ)* for Redis Cache, custom error handler is not getting registered, however *AdviceMode.PROXY* is working as expected. Below is Cache Configuration {code:title=CacheConfiguration.java|borderStyle=solid} @Configuration @EnableCaching(mode = AdviceMode.ASPECTJ) public class AutoConfInitializer extends CachingConfigurerSupport { @Bean public RedisConnectionFactory jedisConnectionFactory(){ List<URI> uris = getURIS(); URI uri = uris.get(0); JedisConnectionFactory redisConnectionFactory = new JedisConnectionFactory(); redisConnectionFactory.setHostName(uri.getHost()); redisConnectionFactory.setPort(uri.getPort()); redisConnectionFactory.setPassword(uri.getUserInfo()); redisConnectionFactory.setUsePool(true); return redisConnectionFactory; } @Bean(name="redisTemplate") public RedisTemplate<Object, Object> redisTemplate() { RedisTemplate<Object, Object> redisTemplate = new RedisTemplate<>(); redisTemplate.setConnectionFactory(jedisConnectionFactory()); redisTemplate.setKeySerializer(new GenericJackson2JsonRedisSerializer()); return redisTemplate; } @Bean @Override public CacheManager cacheManager() { // configure and return an implementation of Spring's CacheManager SPI RedisCacheManager manager = new RedisCacheManager(redisTemplate()); // manager.setDefaultExpiration(); manager.setCacheNames(Collections.unmodifiableList(new ArrayList<>(getCacheProps().keySet()))); manager.setUsePrefix(Boolean.TRUE); manager.setExpires(getCacheProps()); manager.setCachePrefix(cacheName -> (getCachePrefix()+cacheName).getBytes()); return manager; } @Override @Bean public CacheErrorHandler errorHandler() { return new AutoConfInitializer.DefaultCacheErrorHandler(); } // @Configuration public static class DefaultCacheErrorHandler implements CacheErrorHandler { private static final Logger LOG = LoggerFactory.getLogger(DefaultCacheErrorHandler.class); @Override public void handleCacheGetError(RuntimeException exception, Cache cache, Object key) { LOG.warn("[CACHE-CRITICAL]- Unable to retrieve from cache:{}", cache.getName(),exception); } @Override public void handleCachePutError(RuntimeException exception, Cache cache, Object key, Object value) { LOG.warn("[CACHE-CRITICAL]- Unable to Put in cache:{}", cache.getName(),exception); } @Override public void handleCacheEvictError(RuntimeException exception, Cache cache, Object key) { LOG.warn("[CACHE-CRITICAL]- Unable to Evict from cache:{}", cache.getName(),exception); } @Override public void handleCacheClearError(RuntimeException exception, Cache cache) { LOG.warn("[CACHE-CRITICAL]- Unable to clear cache:{}", cache.getName(),exception); } } {code} With advice mode aspectj getting the below exception (as the error handler is setting to SimpleCacheErrorHandler ): 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 at org.springframework.data.redis.connection.jedis.JedisConnectionFactory.fetchJedisConnector(JedisConnectionFactory.java:198)

    Spring JIRA | 5 months ago | Jayaram Pradhan
    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
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Redis (AWS Elasticache) stops working after sometime

    Stack Overflow | 2 weeks ago | Gaurav Srivastava
    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
  6. 0

    Is possible connect on CODIS using Jedi?

    GitHub | 11 months ago | thiagohora
    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

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.springframework.data.redis.RedisConnectionFailureException

      Unexpected end of stream.; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.

      at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert()
    2. Spring Data Redis
      JedisConnection.getConfig
      1. org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:47)
      2. org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:36)
      3. org.springframework.data.redis.PassThroughExceptionTranslationStrategy.translate(PassThroughExceptionTranslationStrategy.java:37)
      4. org.springframework.data.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:37)
      5. org.springframework.data.redis.connection.jedis.JedisConnection.convertJedisAccessException(JedisConnection.java:196)
      6. org.springframework.data.redis.connection.jedis.JedisConnection.getConfig(JedisConnection.java:557)
      6 frames
    3. org.springframework.session
      RedisHttpSessionConfiguration$EnableRedisKeyspaceNotificationsInitializer.afterPropertiesSet
      1. org.springframework.session.data.redis.config.ConfigureNotifyKeyspaceEventsAction.getNotifyOptions(ConfigureNotifyKeyspaceEventsAction.java:69)
      2. org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration$EnableRedisKeyspaceNotificationsInitializer.afterPropertiesSet(RedisHttpSessionConfiguration.java:167)
      2 frames