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)