'Connection Timeout for Spring Redis using Redis Cloud

I am trying to connect Redis in my Spring application. I have created a Redis Database in Redis Cloudredis-10228.c15.us-east-1-2.ec2.cloud.redislabs.com:10228.

I have configured the following in my application.properties

spring.redis.host=redis-10228.c15.us-east-1-2.ec2.cloud.redislabs.com:10228

spring.redis.password=<password-from-redis-cloud>

I am still getting Redis Connection failure event after providing password.

reactor.core.Exceptions$ErrorCallbackNotImplemented: org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to redis-10228.c15.us-east-1-2.ec2.cloud.redislabs.com:10228
Caused by: org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to redis-10228.c15.us-east-1-2.ec2.cloud.redislabs.com:10228

Any misconfiguration done from my part?



Solution 1:[1]

You need to specify the redis port in a different property:

spring.redis.host=redis-10228.c15.us-east-1-2.ec2.cloud.redislabs.com
spring.redis.port=10228

See this for more details.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 pringi