Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
↧

Jedis Issue - "Failed to connect to any host resolved for DNS name."

Whenever I try to connect to my Redis server from my Java application using Jedis, I get JedisConnectionException: Failed to connect to any host resolved for DNS name. The Java application runs on the...

View Article


Redisson client ; RedisTimeoutException issue

I am using Google cloud managed redis cluster(v5) via redisson(3.12.5)Following are my SingleServer configurations in yaml filesingleServerConfig: idleConnectionTimeout: 10000 connectTimeout: 10000...

View Article


Lettuce Redis: Does Command Timeout Include Connection Pool Wait Time?

I'm using LettuceConnection with a connection pool to connect my application to a Redis server. However, during load testing, I encountered a significant number of command timeout errors. Initially, I...

View Article

java access redis throw java.util.NoSuchElementException: Unable to validate...

when I used the java code to operated redis was OK.But after project run a few hours when I access redis again project was throw The following Exception .java.util.NoSuchElementException: Unable to...

View Article

How to use RedisTemplate.execute(SessionCallback) without type issues?

Here's my basic example setup:private final RedisTemplate<String, Object> redisTemplate;public void save(Object thing, Instant expiresAt) { redisTemplate.execute(new SessionCallback<Void>()...

View Article


Jedis : Could not get a resource from the pool

BackgroundOur application uses Jedis-2.2.1 and connects to Redis-2.6, here's how I get jedis resource : protected static JedisWrapper getRedisUserWrite(String UDID) { if (redisUserWritePools.get(0) ==...

View Article

Springboot refuses to utilise the custom RedisCacheManager

So I have a bit of an issue with regards to Redis. It seems that SpringBoot refuses to utilise the custom RedisCacheManager bean that I've created despite using the approppriate annotations ("@Bean",...

View Article

Redis caching issue in Java: data is being cached but not being fetched from...

I have been trying to implement caching, data is being cached in the memory, but not being fetched from the cache memory when called second or third time, instead it's fetching from db everytime when...

View Article


Multiple keys pointing to a single value in Redis (Cache) with Java

I want to store multiple keys with a single value using jedis (Redis cache) with Java.I have three keys like user_1, driver_10, admin_5 and value = this is user, and I want to get value by using any...

View Article


Can I update a Redis key value without changing the remaining TTL in JAVA?

I am using ValueOperations<K,V> from RedisTemplate<K,V>. I just want to update an existing key without affecting its remaining time to live.What is the best practice for doing so? Please...

View Article

Spring Data Redis Repository Function delete...By not working?

I am using spring-data-redis (version 3.5.0-M2).This is my entity class:@RedisHash("Embedding")@Data@NoArgsConstructor@AllArgsConstructorpublic class Embedding { @Id private String id; private byte[]...

View Article

How do I get all the keys from a redis cache via Spring Boot with Spring Data...

I am trying to get the entries in a Spring Boot Cache backed by Redis How do I get all the keys from a redis cache via Spring Boot? uses 1.x of Spring-Data-Redis and the current version uses...

View Article

Spring Data Redis Lettuce Connection Issue

I have spring boot application with MYSQL DB and i am caching the data in Redis in server layer with @Cacheable Annotation@Cacheable(value= "employeeCache", key= "#customerId")@Overridepublic Customer...

View Article


class cast exception : redis Caching

Implementing Redis Caching in java springboot. Getting this errorclass java.util.LinkedHashMap cannot be cast to class com.campus.quizApp.dto.InterviewDateDTO (java.util.LinkedHashMap is in module...

View Article

Jedis and Lettuce async abilities

I am using redis with Akka so I need no blocking calls. Lettuce has async-future call built into it. But Jedis is the recommended client by Redis. Can someone tell me if I am using both of them the...

View Article


Springboot app running on localhost cant communicate with redis running on...

I have a spring boot app that runs on localhost fine. However, I decided to add caching recently and I run my Redis server from docker. The problem I am facing now is that my Springboot app can not...

View Article

Spring Session Redis GraalVM Serialization error

I have a simple Spring Boot application, which uses Oauth2 client and Spring Session Redis. It has default setup in application.yml:spring: session: store-type: redis redis: namespace: my:namespace...

View Article


Redisson client exception Netty threads

I have my application deployed in openshift and also it uses Redis. White it works most of the time , I still face issue related to redisson which is intermittent. The error trace is as below while...

View Article

NOAUTH Authentication required spring-boot-data-redis+Realease Lettuce+Redis...

when I restart redis causejava.util.concurrent.ExecutionException: io.lettuce.core.RedisCommandExecutionException: NOAUTH Authentication required.Why is this a problemuse version like...

View Article

redis.clients.jedis.exceptions.JedisConnectionException:...

While trying to use Jedis.get(key) while accessing the Redis using Jedis I'm getting this error.redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Broken pipe (Write...

View Article

Redisson memory leak When I try to create client

When I try to use Redisson to Connect Redis Server, it some time show me that memory leak error. how can I fix that.The reproduce code is in below.Expected behaviorIt should't have memory leak.Actual...

View Article


Prevent Redisson shutdown when managing Tomcat sessions using...

I am using Redisson to manage Tomcat HTTP sessions (distributed sessions) via Redis. My setup works fine for managing sessions using RedissonSessionManager.However, I am facing an issue:Whenever Tomcat...

View Article


How to configure spring-data-keyvalue to use Redis for persistence?

I have an application using spring-data-keyvalue. As I understand by default it uses HashMap without persistence. The documentation says I could use redis for that, with jedis (among others). I want to...

View Article

Redis cache consistency: how do you deal with it?

Redis is quite popular in Java, spring itself provides quite easy abstraction for caching using redis.You just apply an annotation @Cacheable or use programmatic approach cache.get(..).There is also an...

View Article

Redis-backed semaphore with overflow (force acquire even when limit is reached)

I am looking for a semaphore-like construct with the ability to "force" an acquisition, even when maximum capacity is reached, essentially overflowing the semaphore.I am imagining an interface similar...

View Article


Getting used memory on Redis instance using Redis Enterprise REST API

In my firm, we have Redis clusters and use the APIs from this page for various metadata purpose.For example, this is used to get the memory limit on a Redis instance as well as supported module...

View Article

Java Redisson Client Redis Exceptions :...

I'm setting up a Redis cache layer using AWS Elasticache Redis version 7.0.7I'm usign Java Redisson client version 3.16.0 and java version 1.8However one of the requirement is to setup a fallback...

View Article

What are the notify-keyspace-events in Redis

I started to setup spring project by following this spring-boot article. But suddenly application could not start successfully, instead I am getting the following stack trace:Exception in thread "main"...

View Article

Spring Cache Exception: io.lettuce.core.RedisCommandExecutionException: ERR...

I use Spring Boot Version: 2.1.4.RELEASE When I set spring.cache.redis.time-to-live=20000 in application.yml file.I got a exception. What should I do when I want to add TTL in redis cache ?How to use...

View Article



java.lang.NoClassDefFoundError:...

I'm working on a Spring Boot (3.x) reactive application and trying to configure Redis using Jedis.During application startup, I get the following...

View Article


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>