报错信息为org.springframework.data.redis.redissystemexception: error in execution
MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk
查阅发现是redis不能持久化,通过查询尝试了以下方式:
1.修改redis.conf文件:
vim打开redis-server配置的redis.conf文件,然后使用快捷匹配模式:/stop-writes-on-bgsave-error定位到stop-writes-on-bgsave-error字符串,接着把后面的yes改为no
尝试后无果
之后在redis.conf配置文件中配置好日志文件位置,发现重启时出现错误 Could not create server TCP listening socket *:6379: bind: Address already in use,推测可能是服务器没有正常启动的原因
解决:通过ps -ef|grep redis命令获取redis服务器进程号,使用kill -9 进程号杀死服务器进程,后重启,再启动springboot项目成功运行
初学redis,小小记录一下解决过程