Ayman Patel
Ayman Patel

Reputation: 634

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?

Upvotes: 2

Views: 1465

Answers (1)

pringi
pringi

Reputation: 4652

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.

Upvotes: 1

Related Questions