Commands that may modify the data set are disabled, because this instance is configured to report e

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.

今天kill完redis进程再重启,突然报了上面的错误。
错误意思是,reids不能持久化,用来修改集合数据的命令不能用。因为此实例配置为在 RDB 快照失败时在写入期间报告错误(stop-writes-on-bgsave-error 选项)。请查看 Redis 日志以获取有关 RDB 错误的详细信息。
原因:
强制关闭Redis快照导致不能持久化。

临时解决方案:

运行config set stop-writes-on-bgsave-error no 命令后,关闭配置项stop-writes-on-bgsave-error解决该问题。

root@ubuntu:/usr/local/redis/bin# redis-cli
127.0.0.1:6379> config set stop-writes-on-bgsave-error no
OK

在这里插入图片描述

这样听说只能治标,不能治本
一、 首先到linux 查看redis 的日志文件

    1.找到redis 配置文件 redis.conf

   输入    find . -name "redis.conf"   查找配置文件路径

我的在etc 文件夹下 你的就不一定了

打开redis.conf 文件全局搜索 logfile 查看日志文件地址

在这里插入图片描述

根据地址找到redis.log 打开查找日志打印 我的是这个鬼东西
在这里插入图片描述

dir /etc/cron.d 这个文件权限不够导致写入错误 好啦找问题之所在了

既然权限不够 就赋予他权限 cron.d 是个文件夹 我就将整个文件夹及里面统一赋予权限755 依然是权限不够 只能在高了777 搞定了

赋予权限的语句是 chmod -R 777 cron.d 权限不懂的话另行百度。

问题是解决了 ,还有个问题是为什么云服务器重启后忽然权限不够了呢???

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值