How can I stop redis-server?

前端 未结 26 1799
清歌不尽
清歌不尽 2020-12-07 06:51

I apparently have a redis-server instance running because when I try to start a new server by entering redis-server, I\'m greeted with the followin

26条回答
  •  眼角桃花
    2020-12-07 07:02

    Usually this problem arises after I shut down my computer ( or leaving running ) an irregular way.. I believe the port gets stuck open, while the process stops but continues to be bound to the previous port.

    9/10 times the fix can be:

    $ ps aux | grep redis
    
    -> MyUser 2976  0.0  0.0  2459704    320   ??  S    Wed01PM   0:29.94 redis-server *:6379
    
    $ kill 2976
    
    $ redis-server
    

    Good to go.

提交回复
热议问题