Redis (error) MISCONF Redis is configured to save RDB snapshots

原文链接:https://blog.csdn.net/u012637358/article/details/84852723

转自:https://blog.csdn.net/u012637358/article/details/84852723

1、redis使用注意点:
外网环境下一定不要使用redis默认配置:

 1. 创建redis用户启动redis-server服务;
 2. redis设置requirepass密码;
 3. bind 绑定为内网IP(127.0.0.1或192.168.1.120);
 4. rename-command CONFIG “”,禁用一些命令;

2、暴露问题
redis设置密码访问后,RedisDesktopManager链接工具就不可用了;
redis中set时,出现以下错误;
直接链接redis-server

./redis-cli -h  master_ip  -p port
 >keys *
 (error) NOAUTH Authentication required.
报必须认证,原来必须通过密码链接(呵呵,sb了!~)

 

./redis-cli -h  master_ip  -p port  -a  your_password
 >keys *
链接OK!

 

此时,你get数据是可以,但是当你set时,妹的,又有问题暴露出来了,提示一下错误内容:

(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.


意思是说redis配置了RDB存储快照,但是当前不能持久化到磁盘disk。
即:当前安装的redis版本,强制关闭了Redis快照设置,导致不能持久化!!!!

 

3、解决方法
别瞎逼逼了,赶快解决吧!
将stop-writes-on-bgsave-error设置为no【默认安装的为yes】

> config set stop-writes-on-bgsave-error no
1
再次set,发现完全OK~
 

或者在redis安装目录下,修改其配置文件 redis.windows.conf、redis.windows-service.conf中的 stop-writes-on-bgsave-error 由yes调整为no,重启redis服务【密码requirepass、绑定内容ip时bind都可在这两个文件中调整】。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章