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+0800INFOplugin/plugin.go:73 register
plugin fault-injection
2024-04-19T15:47:27.429+0800INFOplugin/plugin.go:73 register
plugin limit-req
2024-04-19T15:47:27.429+0800INFOplugin/plugin.go:73 register
plugin request-body-rewrite
2024-04-19T15:47:27.429+0800INFOplugin/plugin.go:73 register
plugin response-rewrite
2024-04-19T15:47:27.429+0800INFOplugin/plugin.go:73 register
plugin say
2024-04-19T15:47:27.429+0800WARNserver/server.go:192conf cache
ttl is 1h12m0s
2024-04-19T15:47:27.429+0800WARNserver/server.go:200listening 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
503 Service Temporarily Unavailable
503 Service Temporarily Unavailable
openresty
Powered by https://apisix.apache.org/;>APISIX.
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 - -