Open rajeevkong opened 1 year ago
Know issue with Kong 3.0.0, see https://github.com/Kong/kong/pull/9337#issuecomment-1247893735
Hi, @Tieske. Thanks for the update (I opened the duplicate #368).
I am trying to form a picture of where we are regarding this issue, since #9337 (the supposed fix?) was merged a few months back but the issue still happens with the latest code from Pongo's master.
that PR has 2 fixes in it, and after some internal discussion the 2nd fix was removed to keep it clean. But that is exactly the fix we need here. I am pushing to get this fixed though.
As a workaround place your plugin files inside WSL home folder instead of accessing them on the Windows mount /mnt/c
.
Since this issue is still open, I'd like add this here - I'm seeing this behavior in Kong 3.2.2 on macOS 13 using colima. This includes not seeing the issue on Kong 2.3.2. I understand that there's a fix in place since Oct 2022, but has anyone got this working on macOS with a non-Docker Desktop setup?
@nitinthewiz just to verify, are you seeing this line in your logs;
nginx: [emerg] bind() to unix:/kong-plugin/servroot/worker_events.sock failed (22: Invalid argument)
That would indeed indicate it is the same issue (which hasn't been fixed yet, see my comment above)
@Tieske Thanks for asking for a clarification. I was tracking multiple issues to find a resolution and "Invalid argument" is not the error I'm seeing.
I'm seeing the following error -
nginx: [emerg] bind() to unix:/kong-plugin/servroot/worker_events.sock failed (1: Operation not permitted)
This seems to have been mentioned here, and by you here. I suppose it is not related to this issue. However, I don't see an issue tracking my error specifically.
I suppose just like Vagrant, this needs an absolute path solution for colima on macOS (or perhaps a more generalized solution for macOS?)
The solution would be to make the Unix socket location configurable, or move it to a more appropriate system based location. (that's a Kong change however, not a Pongo change)
I was experiencing the same issue on Ubuntu 22.04 with rancher-desktop
. This is kind of known, see https://github.com/rancher-sandbox/rancher-desktop/issues/1209 for example. The fix mentioned here did not work for me.
As a temporary workaround, I managed to run pongo run -v
by editing the volumes
section of assets/docker-compose.yml
:
kong:
image: ${KONG_TEST_IMAGE:-ignore_if_not_provided}
...
volumes:
- - ${PONGO_WD}:/kong-plugin
+ - /tmp/kong-plugin:/kong-plugin/servroot
+ - ${PONGO_WD}/spec:/kong-plugin/spec
+ - ${PONGO_WD}/kong:/kong-plugin/kong
+ - ${PONGO_WD}/.pongo:/kong-plugin/.pongo
+ - ${PONGO_WD}/.busted:/kong-plugin/.busted
+ - ${PONGO_WD}/.license-scripts:/kong-plugin/.license-scripts
+ - ${PONGO_WD}/kong-plugin-myplugin-0.1.0-1.rockspec:/kong-plugin/kong-plugin-myplugin-0.1.0-1.rockspec
Based on @antoineauger solution, I've tested some configuration and I only needed the following:
kong:
image: ${KONG_TEST_IMAGE:-ignore_if_not_provided}
...
volumes:
- ${PONGO_WD}:/kong-plugin
- /tmp/kong-plugin:/kong-plugin/servroot
@mfbmina Unfortunately, your simpler configuration did not work for my use case/tests. 😿
Some fixtures were not found:
2024/04/17 15:29:13 [error] 780#0: *1302 lua entry thread aborted: runtime error: content_by_lua(...ng_test_custom_inject_http.test.conf:141):2: module 'spec.fixtures.mock_upstream' not found:No LuaRocks module found for spec.fixtures.mock_upstream
no field package.preload['spec.fixtures.mock_upstream']
...
When I use the command
pongo run
I get the following errorThe following command
KONG_VERSION=2.3.2 pongo run
the expected outout would be something similar to this.