I am using Spring Boot 2.7.18, Redisson 3.17.7, and Redis Cluster in my project. The application is running inside a Kubernetes (multi-pod) environment.
My Redis configuration in application.yml:
spring:
redis:
cluster:
nodes: 192.168.1.10:6379,192.168.1.11:6379,192.168.1.12:6379
username: my_redis_user
password: my_redis_password
And the Redisson configuration:
config.useClusterServers()
.setUsername(username)
.setPassword(password);
Problem: When the application runs, I get the following error message in the logs:
ERR Error running script (call to f_dad0f8d619e548e04f21fb48d50be5034df3adae):
@user_script:1: @user_script: 1: The user executing the script can't run this command or subcommand.
It happens when executing EVAL commands for distributed locking in Redisson.
I already granted EVAL permission to my Redis user:
ACL SETUSER my_redis_user +eval
But the error still persists.
Things I've Tried:
Ensured that the Redis user has EVAL permission.
Checked my Redis ACL using:
ACL GETUSER my_redis_user
Output:
user my_redis_user on >my_redis_password -@all +eval +get +set +del +expire +ttl
- Restarted Redis after making changes.
Question:
- What other Redis commands does Redisson require for distributed locking?
- How can I properly grant all necessary permissions without using +@all?
Thanks in advance!