stulzq / kong-plugin-rate-limiting-ex

Rate Limiting Ex is the rate limit plugin for kong gateway.Based on official rate-limiting plugin, I added a property that can be customized to get the request header for the ip address.
9 stars 1 forks source link

Does not work for upgrade to kong-1.0.0 and later version #1

Open yongxincen opened 5 years ago

yongxincen commented 5 years ago

'kong.tools.responses' has been removed from kong-1.0.0 or newer versions. This plugin program needs to change

Steps To Reproduce issue:

  1. Use kong-1.0.0 or newer versions
  2. Add this plugin to /etc/kong/kong.conf
  3. kong start --vv, and get below error

nginx: [error] init_by_lua error: /usr/local/share/lua/5.1/kong/tools/utils.lua:584: .../share/lua/5.1/kong/plugins/rate-limiting-ex/handler.lua:5: module 'kong.tools.responses' not found:No LuaRocks module found for kong.tools.responses no field package.preload['kong.tools.responses'] no file './kong/tools/responses.lua' no file './kong/tools/responses/init.lua' no file '/usr/local/openresty/site/lualib/kong/tools/responses.ljbc' no file '/usr/local/openresty/site/lualib/kong/tools/responses/init.ljbc' no file '/usr/local/openresty/lualib/kong/tools/responses.ljbc' no file '/usr/local/openresty/lualib/kong/tools/responses/init.ljbc' no file '/usr/local/openresty/site/lualib/kong/tools/responses.lua' no file '/usr/local/openresty/site/lualib/kong/tools/responses/init.lua' no file '/usr/local/openresty/lualib/kong/tools/responses.lua' no file '/usr/local/openresty/lualib/kong/tools/responses/init.lua' no file '/usr/local/openresty/luajit/share/luajit-2.1.0-beta3/kong/tools/responses.lua' no file '/usr/local/share/lua/5.1/kong/tools/responses.lua' no file '/usr/local/share/lua/5.1/kong/tools/responses/init.lua' no file '/usr/local/openresty/luajit/share/lua/5.1/kong/tools/responses.lua' no file '/usr/local/openresty/luajit/share/lua/5.1/kong/tools/responses/init.lua' no file '/root/.luarocks/share/lua/5.1/kong/tools/responses.lua' no file '/root/.luarocks/share/lua/5.1/kong/tools/responses/init.lua' no file '/usr/local/openresty/site/lualib/kong/tools/responses.so' no file '/usr/local/openresty/lualib/kong/tools/responses.so' no file './kong/tools/responses.so' no file '/usr/local/lib/lua/5.1/kong/tools/responses.so' no file '/usr/local/openresty/luajit/lib/lua/5.1/kong/tools/responses.so' no file '/usr/local/lib/lua/5.1/loadall.so' no file '/root/.luarocks/lib/lua/5.1/kong/tools/responses.so' no file '/usr/local/openresty/site/lualib/kong.so' no file '/usr/local/openresty/lualib/kong.so' no file './kong.so' no file '/usr/local/lib/lua/5.1/kong.so' no file '/usr/local/openresty/luajit/lib/lua/5.1/kong.so' no file '/usr/local/lib/lua/5.1/loadall.so' no file '/root/.luarocks/lib/lua/5.1/kong.so' stack traceback: [C]: in function 'error' /usr/local/share/lua/5.1/kong/tools/utils.lua:584: in function 'load_module_if_exists' /usr/local/share/lua/5.1/kong/db/dao/plugins.lua:222: in function 'load_plugin_schemas' /usr/local/share/lua/5.1/kong/init.lua:343: in function 'init' init_by_lua:3: in main chunk

stulzq commented 5 years ago

Hello, have received your feedback, I will fix it。

yongxincen commented 5 years ago

Thanks heaps. Looking forward to it.

arpit-nagar commented 4 years ago

@stulzq Do you have any updates on this?