查找到Redis启动错误日志分析

1.WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.

解决方案:root权限执行echo "vm.overcommit_memory=1" > /etc/sysctl.conf ,重启机器!

2.Bad file format reading the append only file: make a backup of your AOF file, then use ./redis-check-aof --fix <filename>

这种情况多数是因为断电宕机导致文件损坏,需要修复AOF文件

解决方案:1.找到appendonly.aof的目录 

               2.cp appendonly.aof appendonly.aof.bak

               3.redis-check-aof --fix appendonly.aof