-
Notifications
You must be signed in to change notification settings - Fork 4.9k
go-pdk plugins break Kong 3.9.0 #14260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, 2025-02-27T20:30:12Z info Diagnostics server disabled {"v": 0} The issue is NOT showing in another deployment of Kong 3.9.0 + KIC 3.4.1 where I do not have any Go plugins |
Hi, I'm experiencing the same issue when upgrading from 3.8.0 to 3.9.0. |
I have the same issue, identical error message. Additionally, to get this far I had to update the values to add
Checking another issue with plugins, I found this, fix going out in 3.10 |
I am facing similar issue. |
I am having a similar issue too with this 3.9.0 version. But I am trying to use JS Custom plugin in my case. kong | 2025/04/03 13:07:01 [error] 1405#0: *9034 [lua] api_helpers.lua:558: handle_error(): /usr/local/share/lua/5.1/lapis/application.lua:440: /usr/local/share/lua/5.1/kong/api/api_helpers.lua:329: body encoding failed while flushing response: Cannot serialise cdata: type not supported
kong | stack traceback:
kong | [C]: in function 'error'
kong | /usr/local/share/lua/5.1/kong/pdk/response.lua:732: in function 'fn'
kong | /usr/local/share/lua/5.1/kong/api/api_helpers.lua:329: in function </usr/local/share/lua/5.1/kong/api/api_helpers.lua:307>
kong |
kong | stack traceback:
kong | [C]: in function 'error'
kong | /usr/local/share/lua/5.1/lapis/application.lua:440: in function 'handler'
kong | /usr/local/share/lua/5.1/lapis/application.lua:186: in function 'resolve'
kong | /usr/local/share/lua/5.1/lapis/application.lua:217: in function </usr/local/share/lua/5.1/lapis/application.lua:215>
kong | [C]: in function 'xpcall'
kong | /usr/local/share/lua/5.1/lapis/application.lua:215: in function 'dispatch'
kong | /usr/local/share/lua/5.1/lapis/nginx.lua:231: in function 'serve'
kong | /usr/local/share/lua/5.1/kong/init.lua:1878: in function 'admin_content'
kong | content_by_lua(nginx-kong.conf:356):2: in main chunk, client: 172.24.0.1, server: kong_admin, request: "GET / HTTP/1.1", host: "localhost:8001", referrer: "http://localhost:8002/"
kong | 172.24.0.1 - - [03/Apr/2025:13:07:01 +0000] "GET / HTTP/1.1" 500 42 "http://localhost:8002/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 Edg/134.0.0.0"
kong | 2025/04/03 13:07:01 [error] 1405#0: *9034 [lua] api_helpers.lua:558: handle_error(): /usr/local/share/lua/5.1/lapis/application.lua:440: /usr/local/share/lua/5.1/kong/api/api_helpers.lua:329: body encoding failed while flushing response: Cannot serialise cdata: type not supported
kong | stack traceback:
kong | [C]: in function 'error'
kong | /usr/local/share/lua/5.1/kong/pdk/response.lua:732: in function 'fn'
kong | /usr/local/share/lua/5.1/kong/api/api_helpers.lua:329: in function </usr/local/share/lua/5.1/kong/api/api_helpers.lua:307>
kong |
kong | stack traceback:
kong | [C]: in function 'error'
kong | /usr/local/share/lua/5.1/lapis/application.lua:440: in function 'handler'
kong | /usr/local/share/lua/5.1/lapis/application.lua:186: in function 'resolve'
kong | /usr/local/share/lua/5.1/lapis/application.lua:217: in function </usr/local/share/lua/5.1/lapis/application.lua:215>
kong | [C]: in function 'xpcall'
kong | /usr/local/share/lua/5.1/lapis/application.lua:215: in function 'dispatch'
kong | /usr/local/share/lua/5.1/lapis/nginx.lua:231: in function 'serve'
kong | /usr/local/share/lua/5.1/kong/init.lua:1878: in function 'admin_content'
kong | content_by_lua(nginx-kong.conf:356):2: in main chunk, client: 172.24.0.1, server: kong_admin, request: "GET / HTTP/1.1", host: "localhost:8001", referrer: "http://localhost:8002/"
kong | 172.24.0.1 - - [03/Apr/2025:13:07:01 +0000] "GET / HTTP/1.1" 500 42 "http://localhost:8002/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 Edg/134.0.0.0" I am running it using docker Dockerfile FROM kong:3.9.0
USER root
RUN apt update
RUN apt install -y nodejs npm python3 make g++
RUN npm install -g kong-pdk And the docker compose configuration is volumes:
db: {}
services:
kong-database:
image: postgres:14
container_name: kong-database
environment:
POSTGRES_USER: kong
POSTGRES_DB: kong
POSTGRES_PASSWORD: kongpass
ports:
- "5432:5432"
networks:
- kong-net
restart: unless-stopped
volumes:
- db:/var/lib/postgresql/data
kong:
build: .
container_name: kong
volumes:
- ./js-plugins:/usr/local/kong/js-plugins
environment:
KONG_DATABASE: postgres
KONG_PG_HOST: kong-database
KONG_PG_USER: kong
KONG_PG_PASSWORD: kongpass
KONG_PROXY_ACCESS_LOG: /dev/stdout
KONG_ADMIN_ACCESS_LOG: /dev/stdout
KONG_PROXY_ERROR_LOG: /dev/stderr
KONG_ADMIN_ERROR_LOG: /dev/stderr
KONG_ADMIN_LISTEN: 0.0.0.0:8001
KONG_ADMIN_GUI_URL: http://localhost:8002
KONG_PLUGINSERVER_NAMES: js
KONG_PLUGINSERVER_JS_SOCKET: /usr/local/kong/js_pluginserver.sock
KONG_PLUGINSERVER_JS_START_CMD: /usr/local/bin/kong-js-pluginserver -v --plugins-directory /usr/local/kong/js-plugins
KONG_PLUGINSERVER_JS_QUERY_CMD: /usr/local/bin/kong-js-pluginserver --plugins-directory /usr/local/kong/js-plugins --dump-all-plugins
ports:
- "8000:8000"
- "8443:8443"
- "8001:8001"
- "8444:8444"
- "8002:8002"
- "8445:8445"
- "8003:8003"
- "8004:8004"
networks:
- kong-net
depends_on:
- kong-database
restart: unless-stopped
redis:
image: redis:7.0
container_name: kong-redis
ports:
- "6380:6379"
networks:
- kong-net
restart: unless-stopped
networks:
kong-net:
driver: bridge Thank you. |
Same goes with my 3.8.0 to 3.9.0. I'm running Kong on K8s with DB (PostgreSQL) and custom plugins, but this issue looks like a pure PDK stuff. Bumping for visibility. |
+1 |
Hi, please check if this fixes your issue in kong gateway 3.10: Kong/go-pdk#226 (comment) |
Is there an existing issue for this?
Kong version (
$ kong version
)3.9.0
Current Behavior
Kong 3.9.0 DBless returns errors on the root admin page when a go plugin is loaded, if there is no existing configuration. This is terminal to Kong on Kubernetes as it causes KIC to fail to configure Kong instances.
It does not happen every request with the MVP but it does in our larger live Kong plugin setup in Kubernetes.
Error in Kong output:
Client receives a 500 and:
KIC logs:
Expected Behavior
Kong returns valid json document when queried on admin interface /, as it does for version 3.8.0.
Steps To Reproduce
docker compose up -d --build
curl localhost:8001/
(may not error every time)Anything else?
The exact same plugins and configuration work correctly with Kong 3.8.0.
The text was updated successfully, but these errors were encountered: