redis数据库错误:MISCONF Redis is configured to save RDB snapshots

编程入门 行业动态 更新时间:2024-10-24 07:29:32

redis数据库<a href=https://www.elefans.com/category/jswz/34/1771449.html style=错误:MISCONF Redis is configured to save RDB snapshots"/>

redis数据库错误:MISCONF Redis is configured to save RDB snapshots

错误信息

at java.lang.Thread.run(Thread.java:748)
2022-10-11 17:30:45.230 ERROR Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.data.redis.RedisSystemException: Error in execution; nested exception is io.lettuce.core.RedisCommandExecutionException: 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.] with root cause
io.lettuce.core.RedisCommandExecutionException: 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.at io.lettuce.core.ExceptionFactory.createExecutionException(ExceptionFactory.java:135)at io.lettuce.core.ExceptionFactory.createExecutionException(ExceptionFactory.java:108)at io.lettuce.core.protocol.AsyncCommandpleteResult(AsyncCommand.java:120)at io.lettuce.core.protocol.AsyncCommandplete(AsyncCommand.java:111)at io.lettuce.core.protocol.CommandWrapperplete(CommandWrapper.java:59)at io.lettuce.core.protocol.CommandHandlerplete(CommandHandler.java:646)at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:604)at io.lettuce.core.protocol.CommandHandler.channelRead(CommandHandler.java:556)at ioty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)at ioty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)at ioty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)at ioty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)at ioty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)at ioty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)at ioty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)at ioty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)at ioty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)at ioty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)at ioty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)at ioty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)at ioty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)at ioty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)at ioty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)at ioty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)at ioty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:648)at ioty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:583)at ioty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:500)at ioty.channel.nio.NioEventLoop.run(NioEventLoop.java:462)at ioty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897)at ioty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)at java.lang.Thread.run(Thread.java:748)

原因

是因为强制把redis快照关闭了导致不能持久化的问题,在网上查了一些相关解决方案,通过stop-writes-on-bgsave-error值设置为no即可避免这种问题。 有两种修改方法,一种是通过redis命令行修改,另一种是直接修改redis.conf配置文件

1. 命令行方式

命令行修改方式示例:

127.0.0.1:6379> config set stop-writes-on-bgsave-error no

2. 修改配置文件

修改redis.conf文件:vi打开redis-server配置的redis.conf文件,然后使用快捷匹配模式:/stop-writes-on-bgsave-error定位到stop-writes-on-bgsave-error字符串所在位置,接着把后面的yes设置为no即可。 

更多推荐

redis数据库错误:MISCONF Redis is configured to save RDB snapshots

本文发布于:2024-02-08 20:48:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1674878.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   数据库   MISCONF   redis   Redis

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!