Redis啟動報錯解決

  • 2019 年 10 月 31 日
  • 筆記
報錯
redis_6379.service – LSB: start and stop redis_6379
   Loaded: loaded (/etc/rc.d/init.d/redis_6379; bad; vendor preset: disabled)
   Active: active (exited) since Wed 2019-09-18 15:40:08 CST; 7s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 22652 ExecStop=/etc/rc.d/init.d/redis_6379 stop (code=exited, status=0/SUCCESS)
  Process: 22692 ExecStart=/etc/rc.d/init.d/redis_6379 start (code=exited, status=0/SUCCESS)

Sep 18 15:40:08 ythzcpt-csmh systemd[1]: Starting LSB: start and stop redis_6379…
Sep 18 15:40:08 ythzcpt-csmh redis_6379[22692]: /var/run/redis_6379.pid exists, process is already running or crashed
Sep 18 15:40:08 ythzcpt-csmh systemd[1]: Started LSB: start and stop redis_6379.

 
 
>刪除pid文件

  cd /var/run

  mv redis_6379.pid redis_6379.pid_bak

>刪除dump.rdb(記憶體快照)文件

  cd /var/lib/redis/6379

  mv dump.rdb dump.rdb_bak

>之後查看是否還有redis服務啟動

  ps -ef |grep redis

  kill -9 

>之後重啟即可