Replies: 1 comment 2 replies
-
I added code for both sample project using main method and how I configure in spring boot |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dear Sir/Madam,
I used to connect to Redis using spring boot 2.0.5.RELEASE that has dependency for lettuce 5.0.5.RELEASE, and everything was working fine. I upgraded my spring boot to 2.4.13 that has dependency for letttuce 6.0.8.RELEASE. Unfortunatly after upgrade I can't connect to redis anymore due to commandTimeoutException.
Redis configuration class is using autocinfiguration for lettuceConnectionFactory from application.properities: spring.redis.host= spring.redis.port= spring.redis.database= spring.redis.timeout=5s then I create redisTemplate bean
I created a simple java console project and used different lettuce 6.x to 6.2.0 versions, but unfortunatlly no way to solve the issue.
public static void main(String[] args) {
RedisClient redisClient = RedisClient.create("redis://server-ip:my-port/0");
// no auth so I didn't add password@ RedisClient.create("redis://password@server-ip:my-port/0");
StatefulRedisConnection<String, String> connection redisClient.connect();
System.out.println("Connected to Redis");
connection.close();
redisClient.shutdown();
}
Please for your kind help and support.
Our redis version is standalone 6.0.4, also no auth usage so I don't add password or user name
Beta Was this translation helpful? Give feedback.
All reactions