Redis报错MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on

世上唯一不能复制的是时间,唯一不能重演的是人生,唯一不劳而获的是年龄。该怎么走,过什么样的生活,全凭自己的选择和努力。人生很贵,请别浪费!与智者为伍,与良善者同行。Redis报错MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on,希望对大家有帮助,欢迎收藏,转发!站点地址:www.bmabk.com,来源:原文

1.错误信息

org.redisson.client.RedisException: MISCONF Redis is configured to save RDB snapshots, 
but is currently not able to persist on disk. Commands that may modify the data set are disabled. 
Please check Redis logs for details about the error.. channel: [id: 0x1ede2079, L:/127.0.0.1:47886 - 
R:localhost/127.0.0.1:6379] command: (PSETEX), params: [APPT_AUTH_START, 86400000, 
PooledUnsafeDirectByteBuf(ridx: 0, widx: 13, cap: 256)]
	at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:371)
	at org.redisson.client.handler.CommandDecoder.decodeCommand(CommandDecoder.java:215)
	at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:153)
	at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:122)

保存RDB快照,但当前无法持久保存在磁盘上。可能修改数据集的命令被禁用。
错误原因

  1. 强制把redis快照关闭了导致不能持久化。
  2. 项目开启了snapshot的持久化模式,且存在大量写入的时候bgsave持久化异常,导致客户端写入数据失败。

解决
设置参数stop-writes-on-bgsave-error为no,也即bgsave异常的时候不要阻止继续写入数据。
通过命令设置:

#进入redis
redis-cli -h 127.0.0.1 -p 6379
config set stop-writes-on-bgsave-error no

修改redis.conf文件

vim打开redis.conf
快速定位 /stop-writes-on-bgsave-error 把es设置为no

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/260315.html

(0)
小半的头像小半

相关推荐

极客之音——专业性很强的中文编程技术网站,欢迎收藏到浏览器,订阅我们!