swallretu opened a new issue, #11170: URL: https://github.com/apache/apisix/issues/11170
### Current Behavior 1.build apisix with docker on mac. [follow by this doc ](https://apisix.apache.org/zh/docs/apisix/build-apisix-dev-environment-on-mac/) ``` 2024/04/19 15:59:12 [warn] 4034#4034: *1 [lua] plugin.lua:255: load_stream(): new plugins: {"limit-conn":true,"ip-restriction":true,"syslog":true,"mqtt-proxy":true}, context: init_worker_by_lua* 2024/04/19 15:59:12 [warn] 4036#4036: *2 [lua] plugin.lua:255: load_stream(): new plugins: {"limit-conn":true,"ip-restriction":true,"syslog":true,"mqtt-proxy":true}, context: init_worker_by_lua* 2024/04/19 15:59:12 [warn] 4042#4042: *4 [lua] plugin.lua:255: load_stream(): new plugins: {"limit-conn":true,"ip-restriction":true,"syslog":true,"mqtt-proxy":true}, context: init_worker_by_lua* 2024/04/19 15:59:12 [warn] 4037#4037: *5 [lua] plugin.lua:255: load_stream(): new plugins: {"limit-conn":true,"ip-restriction":true,"syslog":true,"mqtt-proxy":true}, context: init_worker_by_lua* 2024/04/19 15:59:12 [warn] 4035#4035: *3 [lua] plugin.lua:255: load_stream(): new plugins: {"limit-conn":true,"ip-restriction":true,"syslog":true,"mqtt-proxy":true}, context: init_worker_by_lua* ``` 2.apisix plugin config ``` ext-plugin: path_for_test: /apisix/runner.sock ``` 3.runner.sock in apisix container ``` root@docker-desktop:/apisix# pwd /apisix root@docker-desktop:/apisix# ls -lst | grep runner 0 srwxrwxrw- 1 root root 0 Apr 19 15:47 runner.sock root@docker-desktop:/apisix# ``` 4.apisix go-runner plugin start log and go-runner start cmd on mac ``` ➜ apisix-plugin-helloworld git:(master) ✗ APISIX_LISTEN_ADDRESS=unix:/Users/qujianfei/gitProject/git-sample/apisix/runner.sock ./go-runner run 2024-04-19T15:47:27.425+0800 INFO plugin/plugin.go:73 register plugin fault-injection 2024-04-19T15:47:27.429+0800 INFO plugin/plugin.go:73 register plugin limit-req 2024-04-19T15:47:27.429+0800 INFO plugin/plugin.go:73 register plugin request-body-rewrite 2024-04-19T15:47:27.429+0800 INFO plugin/plugin.go:73 register plugin response-rewrite 2024-04-19T15:47:27.429+0800 INFO plugin/plugin.go:73 register plugin say 2024-04-19T15:47:27.429+0800 WARN server/server.go:192 conf cache ttl is 1h12m0s 2024-04-19T15:47:27.429+0800 WARN server/server.go:200 listening to /Users/qujianfei/gitProject/git-sample/apisix/runner.sock ``` 5. add router with go-runner plugin and access ams/usercenter ``` curl http://127.0.0.1:9180/apisix/admin/routes/1 -H 'X-API-KEY: FmzQicVyePcKPShnXQfooqNeBBnIpvWn' -X PUT -d ' { "uri": "/ams/usercenter", "plugins": { "ext-plugin-pre-req": { "conf": [ { "name": "say", "value":"{\"body\":\"hello\"}"} ] } }, "upstream": { "type": "roundrobin", "nodes": { "192.168.101.23:31102": 1 } } }' curl http://127.0.0.1:9080/ams/usercenter <html> <head><title>503 Service Temporarily Unavailable</title></head> <body> <center><h1>503 Service Temporarily Unavailable</h1></center> <hr><center>openresty</center> <p><em>Powered by <a href="https://apisix.apache.org/">APISIX</a>.</em></p></body> </html> root@docker-desktop:/apisix# ``` "http://127.0.0.1:9080"" ``` after i config apisix and go-runner, then i started apisix and go-runner。i trigged a api call by the router config. the router will call the go-runner plugin。but the plugin not work and i reviewed an 503 error ### Expected Behavior after i config the apisix and go-runner, when i use the go-runner plugin on mac, the runner was used。 ### Error Logs apisix access log and error log error log ``` 2024/04/19 16:01:30 [warn] 4035#4035: *2207 [lua] plugins.lua:82: plugin not found in subsystem http, client: 127.0.0.1, server: , request: "GET /apisix/admin/plugins HTTP/1.1", host: "127.0.0.1:9180" 2024/04/19 18:11:30 [error] 4037#4037: *125872 connect() to unix:/apisix/runner.sock failed (111: Connection refused), client: 127.0.0.1, server: _, request: "GET /ams/usercenter HTTP/1.1", host: "127.0.0.1:9080" 2024/04/19 18:11:30 [error] 4037#4037: *125872 [lua] init.lua:889: phase_func(): failed to connect to the unix socket unix:/apisix/runner.sock: connection refused, client: 127.0.0.1, server: _, request: "GET /ams/usercenter HTTP/1.1", host: "127.0.0.1:9080" 2024/04/19 18:11:30 [warn] 4037#4037: *125872 [lua] plugin.lua:1171: run_plugin(): ext-plugin-pre-req exits with http status code 503, client: 127.0.0.1, server: _, request: "GET /ams/usercenter HTTP/1.1", host: "127.0.0.1:9080" ``` access log ``` "127.0.0.1 - - [19/Apr/2024:16:01:30 +0800] 127.0.0.1:9180 "GET /apisix/admin/plugins HTTP/1.1" 404 62 0.000 "-" "curl/7.68.0" - - - "http://127.0.0.1:9180"" "127.0.0.1 - - [19/Apr/2024:18:11:30 +0800] 127.0.0.1:9080 "GET /ams/usercenter HTTP/1.1" 503 269 0.000 "-" "curl/7.68.0" - - - ### Steps to Reproduce 1. build apisix container on mac by this doc https://apisix.apache.org/zh/docs/apisix/build-apisix-dev-environment-on-mac/ 2. update apisix container ext-plugin setting 3. build go-runner libaray and start with APISIX_LISTEN_ADDRESS param 4. add router to apisix with go-runner plugin 5. call the router to check plugin running station ### Environment - APISIX version (run `apisix version`): 3.9.0 - Operating system (run `uname -a`): Linux docker-desktop 5.10.76-linuxkit SMP Mon Nov 8 10:21:19 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux - OpenResty / Nginx version (run `openresty -V` or `nginx -V`): nginx version: openresty/1.25.3.1 - etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`): {"boot_time":1713513555,"etcd_version":"3.5.0","version":"3.9.0","id":"e8edbdab-0a91-4f26-b840-3b9a619d1de3","hostname":"docker-desktop"} - APISIX Dashboard version, if relevant: - Plugin runner version, for issues related to plugin runners: https://github.com/apache/apisix-go-plugin-runner/tree/master - LuaRocks version, for installation issues (run `luarocks --version`): /usr/local/bin/luarocks 3.8.0 -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
