linux kill redis,cannot kill redis-server on linux

问题

No matter what I do I can't seem to kill redis without another instance popping up immediately with a different PID -- I checked to make sure I was killing the parent process and I was. Any suggestions?? I've already tried restarting my machine. I've also tried the answers from this SO post. Here are the commands I ran to kill and check:

ascourtas@ascourtas-VirtualBox:~$ ps -ef | grep redis

redis 2573 1 0 12:11 ? 00:00:00 /usr/bin/redis-server

0.0.0.0:6379

ascourt+ 2991 2501 0 12:25 pts/6 00:00:00 grep --color=auto

redis

ascourtas@ascourtas-VirtualBox:~$ pgrep redis | xargs -i pstree -ps

{}

systemd(1)───redis-server(2573)─┬─{redis-server}(2575)

└─{redis-server}(2576)

ascourtas@ascourtas-VirtualBox:~$ sudo kill -9 2573

ascourtas@ascourtas-VirtualBox:~$ ps -ef | grep redis

redis 3069 1 0 12:26 ? 00:00:00 /usr/bin/redis-server

0.0.0.0:6379

ascourt+ 3077 2501 0 12:26 pts/6 00:00:00 grep --color=auto

redis

回答1:

Figured it out! Turns out when I had tried the second answer provided at this SO post, I had done cd /etc/init.d and then ran redis-server stop, when I actually should've run /etc/init.d/redis-server stop. I do not know why this matters though.

来源:https://stackoverflow.com/questions/50704960/cannot-kill-redis-server-on-linux

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值