6

I am trying to stop kibana on SSH with kill but it respawns immediatly

dagatsoin@dagatsoin.io [~/logstash]# ps aux | grep kibana
533      28778  0.0  0.0   9292   876 pts/2    S+   00:16   0:00 grep kibana
dagatsoin@dagatsoin.io [~/logstash]# kill -kill 28778
-bash: kill: (28778) - Aucun processus de ce type
dagatsoin@dagatsoin.io [~/logstash]# ps aux | grep kibana
533      28780  0.0  0.0   9292   876 pts/2    S+   00:16   0:00 grep kibana
dagatsoin@dagatsoin.io [~/logstash]# 

How do you kill this process ?

dagatsoin
  • 2,626
  • 6
  • 25
  • 54

5 Answers5

15

As mentioned the output that you are seeing is from the ps aux | grep kibana command that you ran. I'm guessing you started kibana using by running the kibana scipt in the bin directory. In this case do something like this:

ps -ef | grep '.*node/bin/node.*src/cli'

Look for the line that looks something like this:

username   5989  2989  1 11:33 pts/1    00:00:05 ./../node/bin/node ./../src/cli

Then run a kill -9 5989 If you have multiple output rows make sure you kill the correct process.

Lodewyk
  • 396
  • 4
  • 6
2

You try to kill your grep process, not kibana service who is not running currently.

Calumah
  • 2,865
  • 1
  • 20
  • 30
2

For me, nothing worked on Ubuntu 18, except this:

systemctl stop snap.kibana.kibana
Matko Soric
  • 107
  • 3
  • 16
0

You kibana process is not running. when you do run a ps aux command and pipe it with a grep command, grep will be running as a separate process. hence its shows up in the ps aux output as process no 28778 or 28780. you can observe that the process number is changing. every-time you stop the ps aux grep process also ends as it is piped with ps and it starts as a new process(id) when you rerun it. hence you are getting an error when you run kill -kill 28778 as it has already stopped.

Tejus Prasad
  • 6,322
  • 7
  • 47
  • 75
0

When you start your Kibana using the start script in $KIBANA_HOME/bin/kibana, this script runs another script in $KIBANA_HOME/node/bin/node. Remember, you must search using ps command for a different name (not Kibana name).

So I use ps awwwx | grep -i ./bin/../node/bin/node | grep -v grep on new Linux versions like Ubuntu 18 (or ps -ef | grep -i ./bin/../node/bin/node | grep -v grep on older versions) to search for the Kibana node. This command will give you the accurate PID and you can kill the Kibana node via mentioned PID.

grep -v grep part of this command is just to omit the unnecessary lines from the output of the command.

quant
  • 2,184
  • 2
  • 19
  • 29
Vahid F
  • 377
  • 1
  • 7
  • 21