Kong / kong-pongo

Tooling to run plugin tests with Kong and Kong Enterprise
Apache License 2.0
153 stars 55 forks source link

Error when running 'pongo run' against the official 'kong-plugin' template using WSL2: "nginx: [emerg] bind() to unix:/kong-plugin/servroot/worker_events.sock failed (95: Operation not supported)" #368

Open dcominottim opened 1 year ago

dcominottim commented 1 year ago

Pongo version: 2.2.0 kong-plugin: master (7d2759493cfb1a73ee01553862210ca4b938b9d3), latest OS: Windows 11 22H2, WSL[2] 1.0.3.0, Ubuntu 22.04.1 Docker Desktop: 4.15.0 (93002), Docker Engine 20.10.21

Another user/report about the same issue, apparently: https://github.com/Kong/kong-pongo/pull/321#issuecomment-1245602045

danilo@SOPHIA:/mnt/e/workspace/kong-plugin-master$ KONG_IMAGE=kong:3.1.0-ubuntu pongo run
[pongo-INFO] auto-starting the test environment, use the 'pongo down' action to stop it
Kong version: 3.1.0

Stopping after installing dependencies for kong-plugin-myplugin 0.1.0-1

[==========] Running tests from scanned files.
[----------] Global test environment setup.
[----------] Running tests from /kong-plugin/spec/myplugin/01-unit_spec.lua
[ RUN      ] /kong-plugin/spec/myplugin/01-unit_spec.lua @ 18: myplugin: (schema) accepts distinct request_header and response_header
[       OK ] /kong-plugin/spec/myplugin/01-unit_spec.lua @ 18: myplugin: (schema) accepts distinct request_header and response_header (0.40 ms)
[ RUN      ] /kong-plugin/spec/myplugin/01-unit_spec.lua @ 28: myplugin: (schema) does not accept identical request_header and response_header
[       OK ] /kong-plugin/spec/myplugin/01-unit_spec.lua @ 28: myplugin: (schema) does not accept identical request_header and response_header (0.25 ms)
[----------] 2 tests from /kong-plugin/spec/myplugin/01-unit_spec.lua (790.74 ms total)

[----------] Running tests from /kong-plugin/spec/myplugin/02-integration_spec.lua
/kong-plugin/spec/myplugin/02-integration_spec.lua:28: 2022/12/13 17:11:48 [warn] the configuration value 'strict' for configuration property 'worker_consistency' is deprecated
2022/12/13 17:11:48 [warn] the 'worker_consistency' configuration property is deprecated
Error: nginx configuration is invalid (exit code 1):
nginx: the configuration file /kong-plugin/servroot/nginx.conf syntax is ok
nginx: [emerg] bind() to unix:/kong-plugin/servroot/worker_events.sock failed (95: Operation not supported)
nginx: configuration file /kong-plugin/servroot/nginx.conf test failed

  Run with --v (verbose) or --vv (debug) for more details

stack traceback:
        /kong-plugin/spec/myplugin/02-integration_spec.lua:28: in function </kong-plugin/spec/myplugin/02-integration_spec.lua:11>

/kong-plugin/spec/myplugin/02-integration_spec.lua:28: 2022/12/13 17:11:51 [warn] the configuration value 'strict' for configuration property 'worker_consistency' is deprecated
2022/12/13 17:11:51 [warn] the 'worker_consistency' configuration property is deprecated
Error: nginx configuration is invalid (exit code 1):
nginx: the configuration file /kong-plugin/servroot/nginx.conf syntax is ok
nginx: [emerg] bind() to unix:/kong-plugin/servroot/worker_events.sock failed (95: Operation not supported)
nginx: configuration file /kong-plugin/servroot/nginx.conf test failed

  Run with --v (verbose) or --vv (debug) for more details

stack traceback:
        /kong-plugin/spec/myplugin/02-integration_spec.lua:28: in function </kong-plugin/spec/myplugin/02-integration_spec.lua:11>

[----------] 0 tests from /kong-plugin/spec/myplugin/02-integration_spec.lua (4185.38 ms total)

[----------] Global test environment teardown.
[==========] 2 tests from 2 test files ran. (4976.65 ms total)
[  PASSED  ] 2 tests.
[  ERROR   ] 2 errors, listed below:
[  ERROR   ] /kong-plugin/spec/myplugin/02-integration_spec.lua @ 11: myplugin: (access) [#postgres] lazy_setup
[  ERROR   ] /kong-plugin/spec/myplugin/02-integration_spec.lua @ 11: myplugin: (access) [#off] lazy_setup

 2 ERRORS
dcominottim commented 1 year ago

Same issue for WSL2 + Debian after running the exact instructions from pongo's README.

Tieske commented 1 year ago

duplicate of #333