Go plugins not working after upgrading to 2.3.x

hello,
we have exactly the same situation after a Kong upgrade to 2.3.x like posted here:

It would be extremely helpful if anybody could point out and test with that particular example, what exactly is needed to be changed for keeping the Go plugins running after the upgrade.

Played around with the suggested changes without success (also cannot find any working solutions from anywhere) …

Changing docker image to kong:2.3.2-alpine

docker run -ti --rm --name kong-go-plugins
-e “KONG_DATABASE=off”
-e “KONG_GO_PLUGINS_DIR=/tmp/go-plugins”
-e “KONG_DECLARATIVE_CONFIG=/tmp/config.yml”
-e “KONG_PLUGINS=go-hello”
-e “KONG_PROXY_LISTEN=0.0.0.0:8000”
-p 8000:8000
kong-demo

2021/03/17 14:32:17 [error] 1#0: init_by_lua error: /usr/local/share/lua/5.1/kong/init.lua:489: error loading plugin schemas: on plugin ‘go-hello’: go-hello plugin is enabled but not installed;
no plugin found
stack traceback:
[C]: in function ‘assert’
/usr/local/share/lua/5.1/kong/init.lua:489: in function ‘init’
init_by_lua:3: in main chunk
nginx: [error] init_by_lua error: /usr/local/share/lua/5.1/kong/init.lua:489: error loading plugin schemas: on plugin ‘go-hello’: go-hello plugin is enabled but not installed;
no plugin found
stack traceback:
[C]: in function ‘assert’
/usr/local/share/lua/5.1/kong/init.lua:489: in function ‘init’
init_by_lua:3: in main chunk

Trying to set the additional env parameters as suggested.
The result is following:
docker run -ti --rm --name kong-go-plugins
-e “KONG_DATABASE=off”
-e “KONG_GO_PLUGINS_DIR=/tmp/go-plugins”
-e “KONG_DECLARATIVE_CONFIG=/tmp/config.yml”
-e “KONG_PLUGINS=go-hello”
-e “KONG_PROXY_LISTEN=0.0.0.0:8000”
-e “KONG_pluginserver_names = go”
-e “KONG_pluginserver_go_socket = /usr/local/kong/go_pluginserver.sock”
-e “KONG_pluginserver_go_start_cmd = /usr/local/bin/go-pluginserver -kong-prefix /usr/local/kong/ -plugins-directory /tmp/go-plugins”
-e “KONG_pluginserver_go_query_cmd = /usr/local/bin/go-pluginserver -dump-all-plugins -plugins-directory /tmp/go-plugins”
-p 8000:8000
kong-demo

2021/03/17 14:39:12 [error] 1#0: init_by_lua error: /usr/local/share/lua/5.1/kong/init.lua:440: pluginserver_go_start_cmd is not a string: ‘true’
stack traceback:
[C]: in function ‘assert’
/usr/local/share/lua/5.1/kong/init.lua:440: in function ‘init’
init_by_lua:3: in main chunk
nginx: [error] init_by_lua error: /usr/local/share/lua/5.1/kong/init.lua:440: pluginserver_go_start_cmd is not a string: ‘true’
stack traceback:
[C]: in function ‘assert’
/usr/local/share/lua/5.1/kong/init.lua:440: in function ‘init’
init_by_lua:3: in main chunk

Hi @raivo333

It seems you’re mixing old and new styles. I tried to clarify things a little on that GitHub issue you linked, please refer to that. In particular, you have to choose either old-style (KONG_GO_PLUGINS_DIR) or new-style (KONG_PLUGINSERVER_NAMES). Note that all these variables must be set in uppercase.

I want to repeat that we strongly suggest the use of the new embedded server, which requires new-style configuration.

thank you for the references.
You mentioned that there were some bugfixes done in the latest beta versions.
As we are using docker then I think should wait for the official next release, because with the latest 2.3.3-alpine it still throws this conf assertion error

Your suggested run configuration:

docker run -ti --rm
-e “KONG_DATABASE=off”
-e “KONG_DECLARATIVE_CONFIG=/tmp/config.yml”
-e “KONG_PROXY_LISTEN=0.0.0.0:8000”
-e “KONG_PLUGINSERVER_NAMES = go”
-e “KONG_PLUGINSERVER_GO_SOCKET = /usr/local/kong/go_pluginserver.sock”
-e “KONG_PLUGINSERVER_GO_START_CMD = /usr/local/bin/go-pluginserver -kong-prefix /usr/local/kong/ -plugins-directory /tmp/go-plugins”
-e “KONG_PLUGINSERVER_GO_QUERY_CMD = /usr/local/bin/go-pluginserver -dump-all-plugins -plugins-directory /tmp/go-plugins”
-p 8000:8000
kong-demo

[error] 1#0: init_by_lua error: /usr/local/share/lua/5.1/kong/init.lua:441: pluginserver_go_start_cmd is not a string: ‘true’
stack traceback:
[C]: in function ‘assert’
/usr/local/share/lua/5.1/kong/init.lua:441: in function ‘init’
init_by_lua:3: in main chunk
nginx: [error] init_by_lua error: /usr/local/share/lua/5.1/kong/init.lua:441: pluginserver_go_start_cmd is not a string: ‘true’
stack traceback:
[C]: in function ‘assert’
/usr/local/share/lua/5.1/kong/init.lua:441: in function ‘init’
init_by_lua:3: in main chunk


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ