redis异常: MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on

来源:互联网 发布:横河otdr aq7275软件 编辑:程序博客网 时间:2024/05/22 17:22

用了几天的Redis了,一直没有错,我的Redis开在了我的CentOS虚拟机里边,在项目中用代码对缓存进行删除的时候报了这个错误:

redis.clients.jedis.exceptions.JedisDataException: 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之后也就是熟悉的那个盒子,我按了ctrl+z命令,将进程挂起了,(此时还不知道Redis正确的后台运行命令),在后台还是能被唤醒的,所以之前我一直可以读取缓存数据。
错误就在于没有正确的后台运行Redis。把之前的进程kill掉之后运行:

./redis-server redis.conf

结合Redis.conf文件才对。这样就能后台运行了。这应该只是这个错误的其中一种情况。

阅读全文
0 0