diff --git a/changes/issue-5048-detect-noperm-redis-standalone b/changes/issue-5048-detect-noperm-redis-standalone new file mode 100644 index 0000000000..3823c21b96 --- /dev/null +++ b/changes/issue-5048-detect-noperm-redis-standalone @@ -0,0 +1 @@ +* Support Redis in standalone mode when CLUSTER commands are disabled via ACL. diff --git a/server/datastore/redis/redis.go b/server/datastore/redis/redis.go index c8eae2da80..fc5dea76c9 100644 --- a/server/datastore/redis/redis.go +++ b/server/datastore/redis/redis.go @@ -336,7 +336,8 @@ func newCluster(conf PoolConfig) (*redisc.Cluster, error) { } func isClusterDisabled(err error) bool { - return strings.Contains(err.Error(), "ERR This instance has cluster support disabled") + return strings.Contains(err.Error(), "ERR This instance has cluster support disabled") || + strings.Contains(err.Error(), "NOPERM this user has no permissions to run the 'cluster' command") } // On GCP Memorystore the CLUSTER command is entirely unavailable and fails with