Docker的redis容器突然报错,不能使用,(error) MISCONF Redis is configured to save RDB snapshots...
前言
Redis突然链接不上了...
解决方案
#docker 进入redis容器中,其中"f0dd"为redis容器的id开始四位
[root@iZ2zeca7jric8sx4f3n7spZ ~]# docker exec -it f0dd /bin/bash
#错误示例-Begin,已经忘了redis命令是啥了...
root@f0dd1681b64f:/data# get
bash: get: command not found
root@f0dd1681b64f:/data# key
bash: key: command not found
root@f0dd1681b64f:/data# redis
bash: redis: command not found
#错误示例-End,已经忘了redis命令是啥了...
#进入客户端(redis client)
root@f0dd1681b64f:/data# redis-cli
#写入一个键值
127.0.0.1:6379> set name zf
#报错信息
(error) MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.
#解决命令
127.0.0.1:6379> config set stop-writes-on-bgsave-error no
OK
#验证错误是否解决
127.0.0.1:6379> set name zf
OK
摘抄文档
分类:
1011.Docker
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
2014-02-25 简论:int i = 0