redisサービスが起動できない解決策(サーバが不正にシャットダウンしているはず)
2272 ワード
1、redisが作動していないことを確認する.
2、pidファイルを削除し(プロファイルからpidファイルのパスを取得)、再起動してもだめです.
3、エラーログを表示する.
4、rdbファイルを削除し、redisサービスを再起動する
5、去人redisは正常に起動した
[root@localhost run]# /etc/init.d/kkmail_redis status
redis is not running
2、pidファイルを削除し(プロファイルからpidファイルのパスを取得)、再起動してもだめです.
-rw-r--r-- 1 root root 5 8 6 14:37 redis.pid
3、エラーログを表示する.
[root@localhost run]# cd /usr/local/kk-mail/log/redis/
[root@localhost redis]# tail -n 20 redis.log
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 2.8.10 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in stand alone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 4807
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
[4807] 06 Aug 14:37:52.782 # Server started, Redis version 2.8.10
[4807] 06 Aug 14:37:52.782 # Wrong signature trying to load DB from file
[4807] 06 Aug 14:37:52.782 # Fatal error loading the DB: Invalid argument. Exiting.
4、rdbファイルを削除し、redisサービスを再起動する
[root@localhost redis]# rm -f /usr/local/kk-mail/data/redis/data/dump.rdb
[root@localhost redis]# /etc/init.d/kkmail_redis restart
Stopping redis ...
Could not connect to Redis at 127.0.0.1:6379: Connection refused
Redis is stopped
Starting Redis server...
5、去人redisは正常に起動した
[root@localhost redis]# /etc/init.d/kkmail_redis status
redis ( pid 5219 ) is running