redis 写入的时候报错

redis 写入报错

1)报错内容

Exception in thread "main" 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.

2)报错原因

redis的持久化过程中数据不能正常写入磁盘,所以只需要更改目录权限问题就好

3)解决方法

查询redis的配置文件,获取持久化目录: dir  /var/lib/redis

chown redis.redis -R /var/lib/redis

其他方法

网上大多提供的解决方法均为:忽略写入错误

config set stop-writes-on-bgsave-error no
上一篇:Java学习笔记(面向对象下)


下一篇:[转]pro*c/c++编译错误 ” error: sqlca.h: No such file or directory “ 的解决办法