redis.clients.jedis.exceptions.JedisDataException: MISCONF Redis is configured to save RDB snapshots

Posted qixiaohua

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了redis.clients.jedis.exceptions.JedisDataException: MISCONF Redis is configured to save RDB snapshots相关的知识,希望对你有一定的参考价值。

最近在学习Redis ,在写test测试的时候碰到这个报错:

redis.clients.jedis.exceptions.JedisDataException: 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.

redis.clients.jedis.Protocol.processError(Protocol.java:113)
redis.clients.jedis.Protocol.process(Protocol.java:138)
redis.clients.jedis.Protocol.read(Protocol.java:192)
redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:282)
redis.clients.jedis.Connection.getIntegerReply(Connection.java:207)
redis.clients.jedis.BinaryJedis.setnx(BinaryJedis.java:435)
com.radiadesign.catalina.session.RedisSessionManager.createSession(RedisSessionManager.java:274)
org.apache.catalina.connector.Request.doGetSession(Request.java:3014)
org.apache.catalina.connector.Request.getSession(Request.java:2378)
org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:897)
org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:909)
javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:238)
javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:238)
javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:238)
javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

 

解决方法 : 在redis-cli连接到服务器后执行以下命令:

config set stop-writes-on-bgsave-error no

就ok了

 
















以上是关于redis.clients.jedis.exceptions.JedisDataException: MISCONF Redis is configured to save RDB snapshots的主要内容,如果未能解决你的问题,请参考以下文章