Closed suxi closed 3 years ago
What is the permission of /usr/local/apisix/conf/apisix-45.sock
?
it's srwxr-xr-x 1 root root 0 Jul 20 01:51 apisix-45.sock when i added a+w, it's work correctly
I fixed it temperately by adding a Nginx.conf setting user root in config.yml at nginx_config: to let Nginx work process run as root instead of nobody
Issue description
Environment
uname -a
): Linux 39446d29c7b6 5.10.25-linuxkit #1 SMP Tue Mar 23 09:27:39 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux (docker: apache/apisix:2.7-centos)Minimal test code / Steps to reproduce the issue
1.set up a ext-plugin 2.do a request
What's the actual result? (including assertion message & call stack if applicable)
2021/07/20 02:11:21 [warn] 46#46: 29715 [lua] plugin.lua:298: trace_plugins_info_fordebug(): Apisix-Plugins: ext-plugin-pre-req, prometheus, kafka-logger while logging request, client: 172.24.0.1, server: , request: "GET /apis/dianshang/anchor/sales_info?platform_id=71&room_id=100533727735 HTTP/1.1", host: "localhost:9080" 2021/07/20 02:39:28 [crit] 46#46: 75271 connect() to unix:/usr/local/apisix/conf/apisix-45.sock failed (13: Permission denied), client: 172.24.0.1, server: _, request: "GET /apis/dianshang/anchor/sales_info?platform_id=71&room_id=100533727735 HTTP/1.1", host: "localhost:9080" 2021/07/20 02:39:28 [error] 46#46: 75271 [lua] init.lua:553: phasefunc(): failed to connect to the unix socket unix:/usr/local/apisix/conf/apisix-45.sock: permission denied, client: 172.24.0.1, server: , request: "GET /apis/dianshang/anchor/sales_info?platform_id=71&room_id=100533727735 HTTP/1.1", host: "localhost:9080" 2021/07/20 02:39:28 [warn] 46#46: 75271 [lua] plugin.lua:646: runplugin(): ext-plugin-pre-req exits with http status code 503, client: 172.24.0.1, server: , request: "GET /apis/dianshang/anchor/sales_info?platform_id=71&room_id=100533727735 HTTP/1.1", host: "localhost:9080" 2021/07/20 02:39:28 [warn] 46#46: 75271 [lua] plugin.lua:298: trace_plugins_info_fordebug(): Apisix-Plugins: ext-plugin-pre-req, prometheus, kafka-logger, client: 172.24.0.1, server: , request: "GET /apis/dianshang/anchor/sales_info?platform_id=71&room_id=100533727735 HTTP/1.1", host: "localhost:9080" 2021/07/20 02:39:28 [warn] 46#46: 75271 [lua] plugin.lua:298: trace_plugins_info_fordebug(): Apisix-Plugins: ext-plugin-pre-req, prometheus, kafka-logger while logging request, client: 172.24.0.1, server: , request: "GET /apis/dianshang/anchor/sales_info?platform_id=71&roomid=100533727735 HTTP/1.1", host: "localhost:9080" 2021/07/20 02:48:31 [crit] 46#46: *89991 connect() to unix:/usr/local/apisix/conf/apisix-45.sock failed (13: Permission denied), client: 172.24.0.1, server: , request: "GET /apis/dianshang/anchor/sales_info?platform_id=71&room_id=100533727735 HTTP/1.1", host: "localhost:9080" 2021/07/20 02:48:31 [error] 46#46: 89991 [lua] init.lua:553: phasefunc(): failed to connect to the unix socket unix:/usr/local/apisix/conf/apisix-45.sock: permission denied, client: 172.24.0.1, server: , request: "GET /apis/dianshang/anchor/sales_info?platform_id=71&room_id=100533727735 HTTP/1.1", host: "localhost:9080" 2021/07/20 02:48:31 [warn] 46#46: 89991 [lua] plugin.lua:646: runplugin(): ext-plugin-pre-req exits with http status code 503, client: 172.24.0.1, server: , request: "GET /apis/dianshang/anchor/sales_info?platform_id=71&room_id=100533727735 HTTP/1.1", host: "localhost:9080" 2021/07/20 02:48:31 [warn] 46#46: 89991 [lua] plugin.lua:298: trace_plugins_info_fordebug(): Apisix-Plugins: ext-plugin-pre-req, prometheus, kafka-logger, client: 172.24.0.1, server: , request: "GET /apis/dianshang/anchor/sales_info?platform_id=71&room_id=100533727735 HTTP/1.1", host: "localhost:9080" 2021/07/20 02:48:31 [warn] 46#46: 89991 [lua] plugin.lua:298: trace_plugins_info_fordebug(): Apisix-Plugins: ext-plugin-pre-req, prometheus, kafka-logger while logging request, client: 172.24.0.1, server: , request: "GET /apis/dianshang/anchor/sales_info?platform_id=71&room_id=100533727735 HTTP/1.1", host: "localhost:9080"
What's the expected result?
ext plug works correctlly