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