Description
Launch apisix failed via systemctl start apisix, I got the logs like
May 03 15:00:00 lvs systemd[1]: Starting apisix...
May 03 15:00:00 lvs apisix[13574]: /usr/local/openresty/luajit/bin/luajit ./apisix/cli/apisix.lua start
May 03 15:00:01 lvs apisix[13574]: sh: lsof: command not found
May 03 15:00:01 lvs apisix[13574]: nginx.pid exists but there's no corresponding process with pid 3876 , the file will be overwritten
May 03 15:00:02 lvs systemd[1]: Started apisix.
lsof: command not found lsof tool not existed in minimal centos 7 environment. Better to check /proc/pid directory exist or not via lfs. attributes.
|
"luafilesystem = 1.7.0-2", |
- It should
return while checking pid failed, log nginx.pid exists but there's no corresponding process with pid shouldn't output.
|
if pid then |
|
local lsof_cmd = "lsof -p " .. pid |
|
local res, err = util.execute_cmd(lsof_cmd) |
|
if not (res and res == "") then |
|
if not res then |
|
print(err) |
|
else |
|
print("APISIX is running...") |
|
end |
|
|
|
return |
|
end |
|
|
|
print("nginx.pid exists but there's no corresponding process with pid ", pid, |
|
", the file will be overwritten") |
|
end |
Environment
- APISIX version (run
apisix version): 2.13.1
- Operating system (run
uname -a): Linux lvs 3.10.0-327.4.5.el7.x86_64
- OpenResty / Nginx version (run
openresty -V or nginx -V):
- etcd version, if relevant (run
curl http://127.0.0.1:9090/v1/server_info):
- APISIX Dashboard version, if relevant:
- Plugin runner version, for issues related to plugin runners:
- LuaRocks version, for installation issues (run
luarocks --version):
Description
Launch
apisixfailed viasystemctl start apisix, I got the logs likelsof: command not foundlsoftool not existed in minimal centos 7 environment. Better to check/proc/piddirectory exist or not via lfs. attributes.apisix/rockspec/apisix-2.13.1-0.rockspec
Line 51 in cc88a8d
returnwhile checking pid failed, lognginx.pid exists but there's no corresponding process with pidshouldn't output.apisix/apisix/cli/ops.lua
Lines 723 to 738 in cc88a8d
Environment
apisix version): 2.13.1uname -a): Linux lvs 3.10.0-327.4.5.el7.x86_64openresty -Vornginx -V):curl http://127.0.0.1:9090/v1/server_info):luarocks --version):