irpas技术客

错误:Redis----(error) MISCONF Redis is configured to save RDB snapshots_菜鸟老文

网络 1551

错误

刚刚装完Redis我看到下面的报错人都傻了

(error) 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. 127.0.0.1:6379[1]> config set stop-writes-on-bgsave-error no

一个很简单的set操作 翻译:

(错误)错误的Redis配置为保存RDB快照,但当前无法在磁盘上持久化。禁用可能修改数据集的命令,因为此实例配置为在RDB快照失败时报告写入期间的错误(在bgsave error选项上停止写入)。有关RDB错误的详细信息,请查看Redis日志。

127.0.0.1:6379[1]>配置设置bgsave上的停止写入错误号 解决: 不能持久化的问题,在网上查了一些相关解决方案。 通过stop-writes-on-bgsave-error值设置为no即可避免这种问题。 解决一: 一种是通过redis命令行修改,这种方式方便,直接,更改后直接生效,解决问题。

命令行修改方式示例:

127.0.0.1:6379[1]> config set stop-writes-on-bgsave-error no

解决二: 直接修改redis.conf配置文件,但是更改后需要重启redis。 修改redis.conf文件: (1)vim打开redis-server配置的redis.conf文件, (2)使用快捷匹配模式: / stop-writes-on-bgsave-error定位到stop-writes-on-bgsave-error字符串所在位置, (3)把后面的yes设置为no。


1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,会注明原创字样,如未注明都非原创,如有侵权请联系删除!;3.作者投稿可能会经我们编辑修改或补充;4.本站不提供任何储存功能只提供收集或者投稿人的网盘链接。

标签: #错误Rediserror #misconf #redis #is #configured #To #save #rdb