用命令行工具连上后执行“set test 0”出现以下错误提示:
MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.
这个应该是之前强制停止redis快照导致的,查看redis快照状态证实了这一点:
redis 127.0.0.1:6379> info ... rdb_last_bgsave_status:err ...
通过关闭配置项stop-writes-on-bgsave-error解决该问题。
redis 127.0.0.1:6379> config set stop-writes-on-bgsave-error no