1. 程式人生 > >redis服務啟動不了的解決辦法(服務器應非法關機了)

redis服務啟動不了的解決辦法(服務器應非法關機了)

erro pid 服務啟動 cti cal not fatal 啟動不了 ppi

1、確認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


redis服務啟動不了的解決辦法(服務器應非法關機了)