解决redis.exceptions.ResponseError异常:Please check the Redis logs for details about the RDB error

9 篇文章 0 订阅

ErrorRequest: {timestamp=Tue Oct 26 23:58:25 CST 2021, status=500, error=Internal Server Error, exception=org.springframework.dao.InvalidDataAccessApiUsageException, message=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.; nested exception is redis.clients.jedis.exceptions.JedisDataException: 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., path=/app/user/login}

今天要解决的问题主要有两部分:Redis的快照持久化ERROR,还有服务器磁盘不够的异常。

1.命令行方式

服务器中输入redis-cli,进入redis服务。
config set stop-writes-on-bgsave-error no修改redis的配置

2.修改配置文件。

查找redis在服务器中的路径的命令:whereis redis 或者 which redis

进入redis的文件目录下:

vim 打开redis-server配置的redis.conf文件;
使用快速匹配指令:/stop-writes-on-bgsave-error;
修改stop-writes-on-bgsave-error行的yes 为no;
保存并退出。

#ls /proc/71575 -l #cp -a /home/redis-5.0.8/redis.conf /home/redis-5.0.8/redis.conf.20211026 #sed -i '/^save 900 1/s/save/#save/' /home/redis-5.0.8/redis.conf

#sed -i '/^save 300 10/s/save/#save/' /home/redis-5.0.8/redis.conf

#sed -i '/^save 60 10000/a save ""' /home/redis-5.0.8/redis.conf #sed -i '/^save 60 10000/s/save/#save/' /home/redis-5.0.8/redis.conf

#sed -i '/^stop-writes-on-bgsave-error/s/yes/no/' /home/redis-5.0.8/redis.conf

#sed -i '/^logfile/s/""/"\/home\/redis-5.0.8\/redis.log"/' /home/redis-5.0.8/redis.conf

#egrep "save|stop-writes-on-bgsave-error|^log" /home/redis-5.0.8/redis.conf

#diff /home/redis-5.0.8/redis.conf /home/redis-5.0.8/redis.conf.20211026

#ls -l /home/redis-5.0.8 /home/redis-5.0.8/src

#chown -R nfdw.nfdw /home/redis-5.0.8

#/home/redis-5.0.8/src/redis-server /home/redis-5.0.8/redis.conf ps -ef | grep redis

#kill -9 71575


 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值