1. Error: Redis error ERR for redis cluster, evalevalsha number of keys can’t be negative or zero. See Figure 1.

Plaintext
Redis error: ERR for redis cluster, eval/evalsha number of keys can't be negative or zero Redis command was: EVAL local allpks=redis.call('LRANGE','ca:ar:user',0,-1) local pks={} local n=0 local v=nil local i=0 local key='ca:ar:user' for k,pk in ipairs(allpks) do if true then i=i+1 if i>0 then do return redis.call('HGETALL','ca:ar:user:a:' .. pk) end end end end return pks 0
2. Reference URL: https://developer.aliyun.com/article/645851 . One of the limitations of the cloud Redis cluster on Lua scripts is that the call must include a key; otherwise, it directly returns the error message, “-ERR for redis cluster, eval/evalsha number of keys can’t be negative or zerorn”. See Figure 2.

3. Abandon the use of the Alibaba Cloud Redis cluster. The problem is resolved. Subsequent support for the Redis cluster will require adjustments at the program level. See Figure 3.

