百度搜索發現了這麼個解決辦法。可是沒有緣由。執行下,redis 訪問正常了java
項目中用到redis作緩存服務器,近日出現這個異常:web
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
網上搜索,不少人都給出瞭解決方法,但沒有詳細說明問題的前因後果,暫且記下,待有空了研究。apache
解決方法:經過redis-cli鏈接到服務器後執行如下命令:緩存
config set stop-writes-on-bgsave-error notomcat
如此便可。服務器
--------------------- 本文來自 rchm8519 的CSDN 博客 ,全文地址請點擊:https://blog.csdn.net/rchm8519/article/details/48369531?utm_source=copy websocket