MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk(示例代码

Posted 归来的少年

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk(示例代码相关的知识,希望对你有一定的参考价值。

ubuntu上面redis报下列错误:

Caused by: 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-server.log,发现报Failed opening .rdb for saving: Read-only file system
分析可能是rdb权限问题,于是给文件授予777,完了还是不行,于是把启动方式改成配置文件启动,居然成功了。。


解决方案:
a.连接redis-cli后执行config set stop-writes-on-bgsave-error no(此方式试过不行)
b.查看redis.conf里的dir 目录,将redis.conf授权成755以上
c.将启动方式 /etc/init.d/redis-server改成配置文件启动(原因可能是安装时的配置文件路径问题造成)。







以上是关于MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk(示例代码的主要内容,如果未能解决你的问题,请参考以下文章

redisredis异常-MISCONF Redis is configured to save RDB snapshots

打开网站提示:MISCONF Redis is configured to save RDB

(error) MISCONF Redis is configured to save RDB snapshots, but is currently

连接Redis后执行命令错误 MISCONF Redis is configured to save RDB snapshots

解决 MISCONF Redis is configured to save RDB snapshots 异常详解

解决 MISCONF Redis is configured to save RDB snapshots 异常详解