You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/02/21 11:41:08 UTC

[GitHub] [apisix] Lewisyixin opened a new issue #6401: bug: systemd will cause process stop when apisix is started by command

Lewisyixin opened a new issue #6401:
URL: https://github.com/apache/apisix/issues/6401


   ### Issue description
   
   When apisix was started by the command 'apisix start', then using systemd to start apisix will cause the process to shut down. 
   This may not be a bug exactily. But if in a production environment, one engineer starts process whth the former method, and another engineer uses systemd to execute the startup again, it may cause bad effects.
   
   ![image](https://user-images.githubusercontent.com/17898688/154947729-9e570faf-e875-4c80-b595-ab0b579d6e78.png)
   
   One way to avoid this problem is adding 'RemainAfterExit=yes' in apisix.service.
   
   ### Environment
   
   - apisix version (cmd: `apisix version`):2.12.1
   - OS (cmd: `uname -a`): Linux apisix 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 13:29:22 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):nginx version: openresty/1.19.9.1
   - etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):etcd-v3.5.1
   - apisix-dashboard version, if have:
   - the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner):
   - luarocks version, if the issue is about installation (cmd: `luarocks --version`):
   
   
   ### Steps to reproduce
   
   apisix start
   systemctl status apisix
   systemctl stop apisix
   systemctl status apisix
   
   ### Actual result
   
   Porcess shutdown
   
   ### Error log
   
   no need
   
   ### Expected result
   
   systemctl start apisix  will not cause process shutdown


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Lewisyixin commented on issue #6401: bug: systemd will cause process stop when apisix is started by command

Posted by GitBox <gi...@apache.org>.
Lewisyixin commented on issue #6401:
URL: https://github.com/apache/apisix/issues/6401#issuecomment-1047366894


   > It results in the cross operations between manually and systemd.
   > 
   > If operates only by manually or systemd, the result will not come out.
   
   Right , but we just made mistakes in our QA env.  One engineer started by commond, the other used 'systemctl status' and thought the process was not started then  used 'systemd start' and finally found process was stoped. 
   So if  'RemainAfterExit=yes' can be adding in apisix.service if it doesn't cause ohter errors?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] kwanhur commented on issue #6401: bug: systemd will cause process stop when apisix is started by command

Posted by GitBox <gi...@apache.org>.
kwanhur commented on issue #6401:
URL: https://github.com/apache/apisix/issues/6401#issuecomment-1047016902


   It results in the cross operations between manually and systemd.
   
   If operates only by manually or systemd, the result will not come out.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #6401: bug: systemd will cause process stop when apisix is started by command

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #6401:
URL: https://github.com/apache/apisix/issues/6401#issuecomment-1047396464


   Is RemainAfterExit suitable for a proxy? I don't think so after reading https://stackoverflow.com/questions/38072849/when-should-the-option-remainafterexit-needs-to-be-set-true-when-creating-new-sy.
   
   The same behavior happens if the engineer starts Nginx with `nginx -p . start` and stops it with systemctl.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org