Kong ingress fail to start on Docker Desktop Kuberenetes cluster - "init_by_lua error"

Hello,
I’m using Kong on Kubernetes for the last year, on Docker Desktop for windows.
Using the installation instructions, I have a kong.yaml file and I’m applying it using kubectl.

I’ve never had any problems in the past but in the last 24 hours I get the following error from the proxy container of the ingress-king pod:

2021/02/21 19:27:21 [error] 1#0: init_by_lua error: /usr/local/share/lua/5.1/kong/tools/utils.lua:620: error loading module ‘kong.plugins.acme.handler’:
/usr/local/share/lua/5.1/resty/acme/openssl.lua:5: attempt to index field ‘version’ (a nil value)
stack traceback:
/usr/local/share/lua/5.1/resty/acme/openssl.lua:5: in main chunk
[C]: in function ‘require’
/usr/local/share/lua/5.1/resty/acme/util.lua:1: in main chunk
[C]: in function ‘require’
/usr/local/share/lua/5.1/resty/acme/client.lua:3: in main chunk
[C]: in function ‘require’
/usr/local/share/lua/5.1/kong/plugins/acme/client.lua:1: in main chunk
[C]: in function ‘require’
/usr/local/share/lua/5.1/kong/plugins/acme/handler.lua:2: in main chunk
[C]: at 0x7fbe04b0a0f0
[C]: in function ‘xpcall’
/usr/local/share/lua/5.1/kong/tools/utils.lua:611: in function ‘load_module_if_exists’
/usr/local/share/lua/5.1/kong/db/dao/plugins.lua:149: in function ‘load_plugin_handler’
/usr/local/share/lua/5.1/kong/db/dao/plugins.lua:227: in function ‘load_plugin’
/usr/local/share/lua/5.1/kong/db/dao/plugins.lua:275: in function ‘load_plugin_schemas’
/usr/local/share/lua/5.1/kong/init.lua:446: in function ‘init’
init_by_lua:3: in main chunk
stack traceback:
[C]: in function ‘error’
/usr/local/share/lua/5.1/kong/tools/utils.lua:620: in function ‘load_module_if_exists’
/usr/local/share/lua/5.1/kong/db/dao/plugins.lua:149: in function ‘load_plugin_handler’
/usr/local/share/lua/5.1/kong/db/dao/plugins.lua:227: in function ‘load_plugin’
/usr/local/share/lua/5.1/kong/db/dao/plugins.lua:275: in function ‘load_plugin_schemas’
/usr/local/share/lua/5.1/kong/init.lua:446: in function ‘init’
init_by_lua:3: in main chunk
nginx: [error] init_by_lua error: /usr/local/share/lua/5.1/kong/tools/utils.lua:620: error loading module ‘kong.plugins.acme.handler’:
/usr/local/share/lua/5.1/resty/acme/openssl.lua:5: attempt to index field ‘version’ (a nil value)
stack traceback:
/usr/local/share/lua/5.1/resty/acme/openssl.lua:5: in main chunk
[C]: in function ‘require’
/usr/local/share/lua/5.1/resty/acme/util.lua:1: in main chunk
[C]: in function ‘require’
/usr/local/share/lua/5.1/resty/acme/client.lua:3: in main chunk
[C]: in function ‘require’
/usr/local/share/lua/5.1/kong/plugins/acme/client.lua:1: in main chunk
[C]: in function ‘require’
/usr/local/share/lua/5.1/kong/plugins/acme/handler.lua:2: in main chunk
[C]: at 0x7fbe04b0a0f0
[C]: in function ‘xpcall’
/usr/local/share/lua/5.1/kong/tools/utils.lua:611: in function ‘load_module_if_exists’
/usr/local/share/lua/5.1/kong/db/dao/plugins.lua:149: in function ‘load_plugin_handler’
/usr/local/share/lua/5.1/kong/db/dao/plugins.lua:227: in function ‘load_plugin’
/usr/local/share/lua/5.1/kong/db/dao/plugins.lua:275: in function ‘load_plugin_schemas’
/usr/local/share/lua/5.1/kong/init.lua:446: in function ‘init’
init_by_lua:3: in main chunk
stack traceback:
[C]: in function ‘error’
/usr/local/share/lua/5.1/kong/tools/utils.lua:620: in function ‘load_module_if_exists’
/usr/local/share/lua/5.1/kong/db/dao/plugins.lua:149: in function ‘load_plugin_handler’
/usr/local/share/lua/5.1/kong/db/dao/plugins.lua:227: in function ‘load_plugin’
/usr/local/share/lua/5.1/kong/db/dao/plugins.lua:275: in function ‘load_plugin_schemas’
/usr/local/share/lua/5.1/kong/init.lua:446: in function ‘init’
init_by_lua:3: in main chunk

@Aviad_Chen I am experiencing the exact same error when building and deploying Kong from kong:2.0.4-centos, I have builds from 3 weeks ago based on the same public docker tag that are working and I am using that as a base in the meantime.

kong:2.0.4-centos was last pushed 10 months ago on docker hub

Perhaps there was a change on a downstream docker layer?

I’m facing the same issue. @Steve_Chapman or @Aviad_Chen , Were you able to get past the issue?

I had to eventually pin the lua-resty-jwt ~> 0.2.2-0 in the rockspec to get past this issue. Hopefully this comment helps anyone else hitting this problem.

1 Like

Please I do not understand what you mean by pin, what did you do exactly? could you please show an example


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ