Skip to content

bug: make stop can't kill multi apisix server #1671

Description

@nerowangtc

Issue description

If I use make run to start multiple apisix server, the process shows below:
[nero@VM_42_81_centos ~/incubator-apisix]$ ps -ef | grep apisix
nero 28293 1 0 10:35 ? 00:00:00 nginx: master process /usr/local/openresty/bin/openresty -p /home/nero/incubator-apisix/ -c /home/nero/incubator-apisix/conf/nginx.conf
nero 29053 1 0 10:40 ? 00:00:00 nginx: master process /usr/local/openresty/bin/openresty -p /home/nero/incubator-apisix/ -c /home/nero/incubator-apisix/conf/nginx.conf

Now if i use make stop to stop a apisxi server , it goes ok
[nero@VM_42_81_centos ~/incubator-apisix]$ make stop
/usr/local/openresty/bin/openresty -p $PWD/ -c $PWD/conf/nginx.conf -s stop
[nero@VM_42_81_centos ~/incubator-apisix]$ ps -ef | grep apisix
nero 28293 1 0 10:35 ? 00:00:00 nginx: master process /usr/local/openresty/bin/openresty -p /home/nero/incubator-apisix/ -c /home/nero/incubator-apisix/conf/nginx.conf
nero 29362 28108 0 10:42 pts/0 00:00:00 grep --color=auto apisix

But if is make stop again, it produce a error message
[nero@VM_42_81_centos ~/incubator-apisix]$ make stop
/usr/local/openresty/bin/openresty -p $PWD/ -c $PWD/conf/nginx.conf -s stop
nginx: [error] open() "/home/nero/incubator-apisix/logs/nginx.pid" failed (2: No such file or directory)
make: *** [stop] Error 1
[nero@VM_42_81_centos ~/incubator-apisix]$ ps -ef | grep apisix
nero 28293 1 0 10:35 ? 00:00:00 nginx: master process /usr/local/openresty/bin/openresty -p /home/nero/incubator-apisix/ -c /home/nero/incubator-apisix/conf/nginx.conf
nero 29421 28108 0 10:42 pts/0 00:00:00 grep --color=auto apisix

and the another apisix process remains
I think this is a bug if some one missuse this command

Environment

  • apisix version (cmd: apisix version):
  • OS:

Minimal test code / Steps to reproduce the issue

  1. make run
  2. make run
  3. make stop

What's the actual result? (including assertion message & call stack if applicable)

What's the expected result?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions