reids持久化异常:MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persis

出现这个异常时redis就行持久化保存时出现了异常,我的机器是centos,redis是装载为了服务

输入redis-cli进入redis控制菜单

redis-cli

获取日志文件地址:

127.0.0.1:6379> config get logfile
1) "logfile"
2) "/home/logs/myredis/redis_log.log"

可知,我机器的日志文件在/home/logs/myredis/redis_log.log中,用vim打开看看

 vim /home/logs/myredis/redis_log.log

跳转至最后一行,发现是/etc/cron.d这个文件无权限

23343:C 14 Jun 17:30:19.055 # Failed opening the RDB file web (in server root dir /etc/cron.d) for saving: Permission denied

使用chmod命令修改其权限,没想到被拒绝了

[root@VM-8-10-centos etc]# chmod 777 cron.d
chmod: changing permissions of ‘cron.d’: Operation not permitted

使用chattr更改其属性,然后更改:

[root@VM-8-10-centos etc]# chattr -ia cron.d
[root@VM-8-10-centos etc]# chmod 777 cron.d

成功!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值