Error in execution; nested exception is io.lettuce.core.RedisCommandExecutionException: ERR unknown command 'CONFIG'
一般的开源版本的 redis 5.0 是没办法 disable 一个命令的,所以在开源版本的 redis 5.0 的解决方案是直接把 CONFIG
这个命令直接 rename 成空串或者随机字符来禁用此命令。
所以,如果你的报错是 ERR unknown command CONFIG
,请检查你的 redis 配置文件,查看是不是 CONFIG
命令被 rename 了
如果你的报错显示是 ERR config is disabled command ,那你有可能正在使用的是腾讯云公有云或者私有云版本的 redis。
按照官网的说明,想要用 config 命令,是只能用 config get,但是不能用 config set。
当前腾讯云版本的 redis config get 是只支持以下命令
maxmemory,
maxclients,
maxmemory-policy,
databases,
slowlog-log-slower-than
slowlog-max-len,
notify-keyspace-events
lua-time-limit
直接在腾讯云控制台里面找到参数配置,把你需要修改的配置添加上去即可。