Closed pawanmsr closed 2 years ago
How do you configure the ext-plugin
in APISIX?
Could you show us the way you run go-runner?
Hi:
Here is the configuration for ext-plugin
ext-plugin:
# path_for_test: /tmp/runner.sock
cmd: ["APISIX_LISTEN_ADDRESS=unix:/tmp/runner.sock", "/home/[redacted]/go-plugin-runner/apisix-go-plugin-runner/go-runner", "run"]
The go plugin runner is built inside apisix-go-plugin-runner
directory.
It is running in a Virtual Machine with CentOS.
I start the APISIX with sudo: sudo apisix start
I am getting this error in the error.log:
2022/01/25 06:09:15 [warn] 93002#93002: *68 [lua] init.lua:771: respawning new runner..., context: ngx.timer
2022/01/25 06:09:15 [error] 93002#93110: lua pipe child execvp() failed while executing APISIX_LISTEN_ADDRESS=unix:/tmp/runner.sock (2: No such file or directory)
2022/01/25 06:09:15 [warn] 93002#93002: *68 [lua] init.lua:759: runner exited with reason: exit, status: 1, context: ngx.timer
2022/01/25 06:09:15 [warn] 93002#93002: *68 [lua] init.lua:329: flush_token(): flush conf token in shared dict, context: ngx.timer
2022/01/25 06:09:15 [warn] 93002#93002: *68 [lua] init.lua:664: flush conf token lrucache, context: ngx.timer
2022/01/25 06:09:15 [warn] 93002#93002: *68 [lua] init.lua:769: respawn runner 3 seconds later with cmd: ["APISIX_LISTEN_ADDRESS=unix:\/tmp\/runner.sock","\/home\/svmlp17\/go-plugin-runner\/apisix-go-plugin-runner\/go-runner","run"], context: ngx.timer
2022/01/25 06:09:15 [warn] 92999#92999: *1206 [lua] init.lua:329: flush_token(): flush conf token in shared dict, context: ngx.timer
2022/01/25 06:09:15 [warn] 92999#92999: *1206 [lua] init.lua:664: flush conf token lrucache, context: ngx.timer
2022/01/25 06:09:15 [warn] 92998#92998: *1207 [lua] init.lua:329: flush_token(): flush conf token in shared dict, context: ngx.timer
2022/01/25 06:09:15 [warn] 92998#92998: *1207 [lua] init.lua:664: flush conf token lrucache, context: ngx.timer
Let's remove the "APISIX_LISTEN_ADDRESS=unix:/tmp/runner.sock"
. It's only for development purposes.
See https://github.com/apache/apisix-go-plugin-runner/blob/master/docs/en/latest/getting-started.md
APISIX will automatically assign a unix socket address for the runner to listen to when it starts. environment variables do not need to be set manually.
I removed it but then the earlier error messages appear.
I think it is permission issue on the VM, because it worked within a docker container.
Alternate option found. Closing the issue.
Go Version: 1.17.6 APISIX Version: 2.11.0 APISIX-GO_PLUGIN_RUNNER: release/0.2.0