共計(jì) 667 個(gè)字符,預(yù)計(jì)需要花費(fèi) 2 分鐘才能閱讀完成。
最近有位朋友查看他的 Redis 的時(shí)候,卻出現(xiàn)了如下這段錯(cuò)誤提示:
Response received: – MISONFRedis 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.
中文翻譯
收到響應(yīng):– MISONFRedis 配置為保存 RDB 快照,但目前無法在磁盤上保留。可以修改數(shù)據(jù)集的命令被禁用,因?yàn)槿绻?RDB 快照失敗(stop-writes-on-bgsave-error 選項(xiàng)),此實(shí)例配置為在寫入期間報(bào)告錯(cuò)誤。請(qǐng)檢查 Redis 日志以獲取有關(guān) RDB 錯(cuò)誤的詳細(xì)信息。
解決辦法
其實(shí),解決的辦法也非常的簡(jiǎn)單,只要知道自己做過了什么,解決起來就方便得多了。主要是看報(bào)錯(cuò)提示說“stop-writes-on-bgsave-error”這個(gè)選項(xiàng)。從而得出:他這里明顯是權(quán)限的問題,
他的解決辦法也非常的簡(jiǎn)單,以 root 身份的用戶重啟一下 redis 就好了。
最初他是用的是普通用戶啟動(dòng)的 redis,所以報(bào)了這個(gè)錯(cuò)誤。后來用 root 用戶就沒問題了……