一、故障表现
1、新增一个key失败
127.0.0.1:6379> set lion 2
(error) 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、无法关闭服务
service redis-server restart
service redis-server stop
两个命令都是一直卡在stop那一步,一直无法关闭
kill ps aux|grep 'redis-server '|grep -v grep|awk '{print $2}'
#无法杀掉
kill -9 ps aux|grep 'redis-server '|grep -v grep|awk '{print $2}'
#强行杀掉
强行杀掉后无法启动,原来还有个pid的文件没有删除
/run/redis/redis-server.pid
rm /run/redis/redis-server.pid #手动删除它之后才能启动Redis
补充:
下面是无法关闭redis-server的原因
8576:signal-handler (1527833505) Received SIGTERM scheduling shutdown...
8576:M 01 Jun 14:11:45.180 # User requested shutdown...
8576:M 01 Jun 14: