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快照,但当前无法持久保存在磁盘上。可能修改数据集的命令被禁用。
错误原因
- 强制把redis快照关闭了导致不能持久化。
- 项目开启了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