Spring

 View Only

 Is there any settings required to get Redis on-demand to work with a Spring Boot app on PWS?. I cannot find any documentation for the available config.

Rod McCutcheon's profile image
Rod McCutcheon posted May 12, 2020 08:58 AM
Failed to lock mutex at cache:80003669; nested exception is org.springframework.data.redis.RedisSystemException: Error in execution; nested exception is io.lettuce.core.RedisCommandExecutionException: ERR unknown command `EVALSHA`, with args beginning with: `8426c8df41c64d8177dce3ecbbe9146ef3759cd2`, `1`, `cache:80003669`, `f0595361-bd78-437f-a454-fc516cadbc4a`, `10000`, "

I am getting the above error. I ssh'd into the service and ran the INFO command with the redis-cli which revelled it is running version 5.0.8. I then tried running the spring boot app locally connecting to redis v5.0.8 running in a docker container, and that worked fine.

 

Also tried unbinding and rebinding the service, and restaging the app with no luck.

 

I'm using Spring Data Redis with the Lettuce driver.

 

Any troubleshooting steps I can try?

Daniel Mikusa's profile image
Daniel Mikusa

Specifically which provider & plan are you using on PWS? I know there are a couple redis providers and plans. What's the output of `cf service <name>`. Thanks.

Daniel Mikusa's profile image
Daniel Mikusa

I missed this initially, but the EVAL/EVALSHA commands are related to running LUA scripts on the Redis instance. Lua scripting is a check box that can be enabled or disabled on the Redis service plan by the operations team for Pivotal Redis (other service providers on PWS may have different configurations).

 

I don't have access to the service plan configuration for Pivotal Redis on PWS, but the fact that those commands are not showing up seems like reasonable evidence that Lua scripting is disabled on PWS service plans.

 

I don't think Spring Data Redis requires Lua scripting but it does support it. Are you specifically using Lua scripting with Redis? Thanks

Rod McCutcheon's profile image
Rod McCutcheon

I was using p.redis (Pivotal On-Demand Redis)

 

p.redis       cache-small, cache-medium, cache-large                           Dedicated Redis for Pivotal Cloud Foundry instances                                               redis-odb

 

I'm not specifically using Lua scripting with Redis, just using it with the @Cacheable abstraction as a simple cache.

 

When I switched to Rediscloud it works:

 

name:       cache

service:     rediscloud

tags:

plan:       30mb

description:   Enterprise-Class Redis for Developers

 

 

However, I would prefer to use the Pivotal On-Demand Redis (p.redis). Is there anyway to get it working?

Daniel Mikusa's profile image
Daniel Mikusa

Can you send me the full stack trace for the error that you're seeing? Thanks