Skip to content
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

module 'kong.tools.responses' not found:No LuaRocks module found for kong.tools.responses #1

Open
gowthamgoli opened this issue May 27, 2020 · 1 comment

Comments

@gowthamgoli
Copy link

gowthamgoli commented May 27, 2020

Thanks for building this plugin but unfortunately kong.tools.responses seems to be removed in new version of Kong 2.x.x. I'm using Kong 2.0.4 specifically. Do you have any plans of supporting this plugin for newer versions of Kong?

kong_1      | kong-aggregator 0.1-1 depends on lua ~> 5.1 (5.1-1 provided by VM)
kong_1      | kong-aggregator 0.1-1 is now installed in /usr/local
kong_1      | 
kong_1      | Done Installing custom plugins
kong_1      | 2020/05/27 05:02:00 [error] 1#0: init_by_lua error: /usr/local/share/lua/5.1/kong/tools/utils.lua:620: error loading module 'kong.plugins.kong-aggregator.handler':
kong_1      | ...l/share/lua/5.1/kong/plugins/kong-aggregator/handler.lua:6: module 'kong.tools.responses' not found:No LuaRocks module found for kong.tools.responses
kong_1      | 	no field package.preload['kong.tools.responses']
kong_1      | 	no file './kong/tools/responses.lua'
kong_1      | 	no file './kong/tools/responses/init.lua'
kong_1      | 	no file '/usr/local/openresty/site/lualib/kong/tools/responses.ljbc'
kong_1      | 	no file '/usr/local/openresty/site/lualib/kong/tools/responses/init.ljbc'
kong_1      | 	no file '/usr/local/openresty/lualib/kong/tools/responses.ljbc'
kong_1      | 	no file '/usr/local/openresty/lualib/kong/tools/responses/init.ljbc'
kong_1      | 	no file '/usr/local/openresty/site/lualib/kong/tools/responses.lua'
kong_1      | 	no file '/usr/local/openresty/site/lualib/kong/tools/responses/init.lua'
kong_1      | 	no file '/usr/local/openresty/lualib/kong/tools/responses.lua'
kong_1      | 	no file '/usr/local/openresty/lualib/kong/tools/responses/init.lua'
kong_1      | 	no file '/usr/local/openresty/luajit/share/luajit-2.1.0-beta3/kong/tools/responses.lua'
kong_1      | 	no file '/usr/local/share/lua/5.1/kong/tools/responses.lua'
kong_1      | 	no file '/usr/local/share/lua/5.1/kong/tools/responses/init.lua'
kong_1      | 	no file '/usr/local/openresty/luajit/share/lua/5.1/kong/tools/responses.lua'
kong_1      | 	no file '/usr/local/openresty/luajit/share/lua/5.1/kong/tools/responses/init.lua'
kong_1      | 	no file '/root/.luarocks/share/lua/5.1/kong/tools/responses.lua'
kong_1      | 	no file '/root/.luarocks/share/lua/5.1/kong/tools/responses/init.lua'
kong_1      | 	no file '/usr/local/openresty/site/lualib/kong/tools/responses.so'
kong_1      | 	no file '/usr/local/openresty/lualib/kong/tools/responses.so'
kong_1      | 	no file './kong/tools/responses.so'
kong_1      | 	no file '/usr/local/lib/lua/5.1/kong/tools/responses.so'
kong_1      | 	no file '/usr/local/openresty/luajit/lib/lua/5.1/kong/tools/responses.so'
kong_1      | 	no file '/usr/local/lib/lua/5.1/loadall.so'
kong_1      | 	no file '/root/.luarocks/lib/lua/5.1/kong/tools/responses.so'
kong_1      | 	no file '/usr/local/openresty/site/lualib/kong.so'
kong_1      | 	no file '/usr/local/openresty/lualib/kong.so'
kong_1      | 	no file './kong.so'
kong_1      | 	no file '/usr/local/lib/lua/5.1/kong.so'
kong_1      | 	no file '/usr/local/openresty/luajit/lib/lua/5.1/kong.so'
kong_1      | 	no file '/usr/local/lib/lua/5.1/loadall.so'
kong_1      | 	no file '/root/.luarocks/lib/lua/5.1/kong.so'
kong_1      | stack traceback:
kong_1      | 	[C]: in function 'require'
kong_1      | 	...l/share/lua/5.1/kong/plugins/kong-aggregator/handler.lua:6: in main chunk
kong_1      | 	[C]: at 0x7f5fe7186830
kong_1      | 	[C]: in function 'xpcall'
kong_1      | 	/usr/local/share/lua/5.1/kong/tools/utils.lua:611: in function 'load_module_if_exists'
kong_1      | 	/usr/local/share/lua/5.1/kong/db/dao/plugins.lua:149: in function 'load_plugin_handler'
kong_1      | 	/usr/local/share/lua/5.1/kong/db/dao/plugins.lua:227: in function 'load_plugin'
kong_1      | 	/usr/local/share/lua/5.1/kong/db/dao/plugins.lua:275: in function 'load_plugin_schemas'
kong_1      | 	/usr/local/share/lua/5.1/kong/init.lua:427: in function 'init'
kong_1      | 	init_by_lua:3: in main chunk
kong_1      | stack traceback:
kong_1      | 	[C]: in function 'error'
kong_1      | 	/usr/local/share/lua/5.1/kong/tools/utils.lua:620: in function 'load_module_if_exists'
kong_1      | 	/usr/local/share/lua/5.1/kong/db/dao/plugins.lua:149: in function 'load_plugin_handler'
kong_1      | 	/usr/local/share/lua/5.1/kong/db/dao/plugins.lua:227: in function 'load_plugin'
kong_1      | 	/usr/local/share/lua/5.1/kong/db/dao/plugins.lua:275: in function 'load_plugin_schemas'
kong_1      | 	/usr/local/share/lua/5.1/kong/init.lua:427: in function 'init'
kong_1      | 	init_by_lua:3: in main chunk
@gowthamgoli
Copy link
Author

gowthamgoli commented May 29, 2020

I managed to fix this by using kong.response.exit. I'm new to kong and its plugins so apologies if this is something obvious but is it possible to dynamically construct config params like POST body etc. rather than having static values?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant