1、起因
使用jeecgboot验证码登陆后台时,一直报验证码错误,看控制台发现是redis报错了,具体如下:
Error in execution; nested exception is io.lettuce.core.RedisCommandExecutionException: MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.
2、解决方法
在linux执行命令redis-cli -p 6380进入redis,这里我们redis端口是6380.
redis-cli -p 6380
redis设置有密码需要先执行授权命令:auth 123456,这里我们的密码是123456
auth 123456
执行命令修改redis配置:config set stop-writes-on-bgsave-error no
config set stop-writes-on-bgsave-error no