redis快照關閉導致不能持久化的問題


1,redis logs信息
tail -f logs/access.log
18517:C 01 Jul 11:16:56.094 # Failed opening the RDB file root (in server root dir /etc/cron.d) for saving: Permission denied
31521:M 01 Jul 11:16:56.181 # Background saving error
31521:M 01 Jul 11:17:02.071 * 1 changes in 900 seconds. Saving...
31521:M 01 Jul 11:17:02.071 * Background saving started by pid 18530
18530:C 01 Jul 11:17:02.078 # Failed opening the RDB file root (in server root dir /etc/cron.d) for saving: Permission denied
31521:M 01 Jul 11:17:02.173 # Background saving error
31521:M 01 Jul 11:17:08.066 * 1 changes in 900 seconds. Saving...
31521:M 01 Jul 11:17:08.066 * Background saving started by pid 18548
18548:C 01 Jul 11:17:08.082 # Failed opening the RDB file root (in server root dir /etc/cron.d) for saving: Permission denied
31521:M 01 Jul 11:17:08.166 # Background saving error

2,解決辦法:
1)命令行修改
config set stop-writes-on-bgsave-error no
2)修改配置文件
vim redis.conf
stop-writes-on-bgsave-error 把后面的yes設置為no即可
#此辦法需要重啟redis

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM