Redis错误集合

ERR value is not an integer or out of range

检查代码中是否有自增的操作,确定自增量是否是整型

Could not connect to Redis at 127.0.0.1:6379: Connection refused

MISCONF Redis is configured to save RDB snapshots

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 opti on). Please check the Redis logs for details about the RDB error.

原因

强制关闭Redis快照导致不能持久化。

查看Redis日志

file

这是Redis报出的日志, 这个错误有可能是磁盘空间不足, 导致Redis不能持续化到硬盘

Write error saving DB on disk: No space left on device

解决方案 第一步

将stop-writes-on-bgsave-error设置为no

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

解决方案 第二步

检查磁盘空间

参考文献

docker 启动 redis telnet 不通

bind 的是 127.0.0.1 修改成 0.0.0.0

bind 0.0.0.0