Category | Error code | Description |
Cluster architecture | -ERR for redis cluster, eval/evalsha number of keys can't be negative or zero\r\n
| You must include a key when you execute a Lua script. Proxy nodes use the key to determine the shard to which the Lua script is forwarded.
# Example of valid command usage:
EVAL "return redis.call('get', KEYS[1])" 1 fooeval
# Example of invalid command usage:
EVAL "return redis.call('get', 'foo')" 0
|
-ERR 'xxx' command keys must in same slot
| Multiple keys in a Lua script must belong to the same slot.
# Example of valid command usage:
EVAL "return redis.call('mget', KEYS[1], KEYS[2])" 2 foo {foo}bar
# Example of invalid command usage:
EVAL "return redis.call('mget', KEYS[1], KEYS[2])" 2 foo foobar
|
Lua syntax check in proxy mode (You can set the script_check_enable parameter to 0 to disable this check.) | -ERR bad lua script for redis cluster, nested redis.call/redis.pcall
| Nested calls are not supported. You can call the Lua script by using local variables.
# Example of valid command usage:
EVAL "local value = redis.call('GET', KEYS[1]); redis.call('SET', KEYS[2], value)" 2 foo bar
# Example of invalid command usage:
EVAL "redis.call('SET', KEYS[1], redis.call('GET', KEYS[2]))" 2 foo bar
|
-ERR bad lua script for redis cluster, first parameter of redis.call/redis.pcall must be a single literal string
| When you use Lua scripts with the redis.call or redis.pcall function, the first parameter you provide must be a string literal representing the command that you want to run.
# Example of valid command usage:
eval "redis.call('GET', KEYS[1])" 1 foo
# Example of invalid command usage:
eval "local cmd = 'GET'; redis.call(cmd, KEYS[1])" 1 foo
|
-ERR bad lua script for redis cluster, all the keys that the script uses should be passed using the KEYS array\r\n
| Lua scripts use the redis.call or redis.pcall function to run commands. All keys must be specified by using the KEYS array, which cannot be replaced by Lua variables. Note This limit applies only to Redis Open-Source Edition instances that run Redis 5.0 (with minor version earlier than 5.0.8) or Redis 4.0 or earlier, cloud-native instances whose proxy version is earlier than 7.0.2, or classic instances whose proxy version is earlier than 6.8.12. If the instance version and proxy version meet the requirements but the limit still exists, modify any parameter such as query_cache_expire. Wait for 1 minute and try again.
# Example of valid command usage:
EVAL "return redis.call('mget', KEYS[1], KEYS[2])" 2 foo {foo}bar
# Example of invalid command usage:
EVAL "return redis.call('mget', KEYS[1], '{foo}bar')" 1 foo # This command is invalid because the '{foo}bar' key must be specified by using the KEYS array.
EVAL "local i = 2 return redis.call('mget', KEYS[1], KEYS[i])" 2 foo {foo}bar # This command is invalid because the index of keys consists of variables, which is not allowed for an instance in proxy mode. Instances in direct connection mode are not subject to this limit.
EVAL "return redis.call('mget', KEYS[1], ARGV[1])" 1 foo {foo}bar # This command is invalid because ARGV[1] cannot be specified as a key.
|
-ERR bad lua script for redis cluster, all the keys that the script uses should be passed using the KEYS array, include destination, and KEYS should not be in expression
| The destination parameter of the ZUNIONSTORE and ZINTERSTORE commands must be specified by using the KEYS array. Note This limit applies only to Redis Open-Source Edition instances that run Redis 5.0 (with minor version earlier than 5.0.8) or Redis 4.0 or earlier, cloud-native instances whose proxy version is earlier than 7.0.2, or classic instances whose proxy version is earlier than 6.8.12. If the instance version and proxy version meet the requirements but the limit still exists, modify any parameter such as query_cache_expire. Wait for 1 minute and try again. |
-ERR bad lua script for redis cluster, ZUNIONSTORE/ZINTERSTORE numkeys parameter should be a single number and not expression
| The numkeys parameter of the ZUNIONSTORE and ZINTERSTORE commands is not a constant. Note This limit applies only to Redis Open-Source Edition instances that run Redis 5.0 (with minor version earlier than 5.0.8) or Redis 4.0 or earlier, cloud-native instances whose proxy version is earlier than 7.0.2, or classic instances whose proxy version is earlier than 6.8.12. If the instance version and proxy version meet the requirements but the limit still exists, modify any parameter such as query_cache_expire. Wait for 1 minute and try again. |
-ERR bad lua script for redis cluster, ZUNIONSTORE/ZINTERSTORE numkeys value is not an integer or out of range
| The numkeys parameter of the ZUNIONSTORE and ZINTERSTORE commands is not a number. Note This limit applies only to Redis Open-Source Edition instances that run Redis 5.0 (with minor version earlier than 5.0.8) or Redis 4.0 or earlier, cloud-native instances whose proxy version is earlier than 7.0.2, or classic instances whose proxy version is earlier than 6.8.12. If the instance version and proxy version meet the requirements but the limit still exists, modify any parameter such as query_cache_expire. Wait for 1 minute and try again. |
-ERR bad lua script for redis cluster, ZUNIONSTORE/ZINTERSTORE all the keys that the script uses should be passed using the KEYS array
| All keys of the ZUNIONSTORE and ZINTERSTORE commands must be specified by using the KEYS array. Note This limit applies only to Redis Open-Source Edition instances that run Redis 5.0 (with minor version earlier than 5.0.8) or Redis 4.0 or earlier, cloud-native instances whose proxy version is earlier than 7.0.2, or classic instances whose proxy version is earlier than 6.8.12. If the instance version and proxy version meet the requirements but the limit still exists, modify any parameter such as query_cache_expire. Wait for 1 minute and try again. |
-ERR bad lua script for redis cluster, XREAD/XREADGROUP all the keys that the script uses should be passed using the KEYS array | All keys of the XREAD and XREADGROUP commands must be specified by using the KEYS array. Note This limit applies only to Redis Open-Source Edition instances that run Redis 5.0 (with minor version earlier than 5.0.8) or Redis 4.0 or earlier, cloud-native instances whose proxy version is earlier than 7.0.2, or classic instances whose proxy version is earlier than 6.8.12. If the instance version and proxy version meet the requirements but the limit still exists, modify any parameter such as query_cache_expire. Wait for 1 minute and try again. |
-ERR bad lua script for redis cluster, all the keys that the script uses should be passed using the KEYS array, and KEYS should not be in expression, sort command store key does not meet the requirements
| The keys of the SORT commands must be specified by using the KEYS array. Note This limit applies only to Redis Open-Source Edition instances that run Redis 5.0 (with minor version earlier than 5.0.8) or Redis 4.0 or earlier, cloud-native instances whose proxy version is earlier than 7.0.2, or classic instances whose proxy version is earlier than 6.8.12. If the instance version and proxy version meet the requirements but the limit still exists, modify any parameter such as query_cache_expire. Wait for 1 minute and try again. |
Read/write permissions | -ERR Write commands are not allowed from read-only scripts
| Lua scripts sent by using the EVAL_RO command cannot contain write commands. |
-ERR bad write command in no write privilege
| Lua scripts sent by a read-only account cannot contain write commands. |
Unsupported commands | -ERR script debug not support
| The SCRIPT DEBUG command is not supported in proxy mode. |
-ERR bad lua script for redis cluster, redis.call/pcall unkown redis command xxx
| Lua scripts contain commands that are not supported in proxy mode. For more information, see Limits on commands supported by cluster instances and read/write splitting instances. |
Lua syntax | -ERR bad lua script for redis cluster, redis.call/pcall expect '('
-ERR bad lua script for redis cluster, redis.call/redis.pcall definition is not complete, expect ')'
| Lua syntax error: The redis.call function must be followed by the complete set of ( and ) . |
-ERR bad lua script for redis cluster, at least 1 input key is needed for ZUNIONSTORE/ZINTERSTORE
| The numkeys parameter of the ZUNIONSTORE and ZINTERSTORE commands must be greater than 0. |
-ERR bad lua script for redis cluster, ZUNIONSTORE/ZINTERSTORE key count < numkeys
| The number of keys in the ZUNIONSTORE and ZINTERSTORE commands is less than the numkeys value. |
-ERR bad lua script for redis cluster, xread/xreadgroup command syntax error
| The XREAD or XREADGROUP command uses incorrect syntax. Check the number of parameters. |
-ERR bad lua script for redis cluster, xread/xreadgroup command syntax error, streams must be specified
| The streams parameter is required in the XREAD and XREADGROUP commands. |
-ERR bad lua script for redis cluster, sort command syntax error
| The SORT command uses incorrect syntax. |