Skullabs / kikaha

A fast middleware designed for microservices
https://skullabs.github.io/kikaha/
Apache License 2.0
59 stars 13 forks source link

Sometimes, the Kikaha's restart command does not recognizes that the software is actually running #127

Closed sizebay closed 8 years ago

sizebay commented 8 years ago

Bellow is the commands we've done to simulate this problem.

ec2-user: /storage
$ ps aux | grep kika
ec2-user  2607  0.2 11.1 3782692 451732 ?      Sl   Jan13   4:03 java -classpath .:./lib/* kikaha.core.Main
ec2-user 22312  0.0  0.0 110456  2332 pts/0    R+   20:53   0:00 grep --color=auto kika
ec2-user 26210  0.3  6.0 3686872 246624 ?      Sl   12:51   1:49 java -Dconfig.app.dir=/storage/admin-panel -classpath .:./lib/* kikaha.core.Main
ec2-user: /storage
$ vim admin-panel/bin/kikaha.sh 
ec2-user: /storage
$ ./admin-panel/bin/kikaha.sh stop
       __  _  ____  __  _   ____  __ __   ____ 
      |  |/ ]|    ||  |/ ] /    ||  |  | /    |
      |  ' /  |  | |  ' / |  o  ||  |  ||  o  |
      |    \  |  | |    \ |     ||  _  ||     |
      |     | |  | |     ||  _  ||  |  ||  _  |
      |  .  | |  | |  .  ||  |  ||  |  ||  |  |
      |__|\_||____||__|\_||__|__||__|__||__|__|
 an absurdly fast web server designed for microservices

[WARN] Server not running
miere commented 8 years ago

Hi @sizebay, thanks for share you problem with us.

Kikaha's script uses a grep command to identify if there is an instance of kikaha already running. Indeed, when grep's PID is greater than java's PID, then it will fail to identify if kikaha's is running.

I've defined this issue status as a bug.