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都可在這兩個文件中調整】。

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