Unable to connect to Redis

Hello,

I am deployed a Spring Boot application that uses Spring Data Redis. In my .env variables, I set the Redis host and port using the values from the Key Value service I created on Render.

However, I am getting the following error in the application logs:

2025-05-17T13:18:08.753Z ERROR 1 — [nio-8080-exec-7] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path threw exception [Request processing failed: org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis] with root cause
java.net.ConnectException: Connection refused
at java.base/sun.nio.ch.Net.pollConnect(Native Method) ~[na:na]


Could you please help me understand if there are any additional steps needed to allow my application to connect to the Redis Key Value service on Render?

Thank you!

How does the redis url look like in ur env vars?