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

Error "plugin is in use but not enabled" #2896

Closed
vikaskmr1008 opened this issue Sep 19, 2017 · 5 comments
Closed

Error "plugin is in use but not enabled" #2896

vikaskmr1008 opened this issue Sep 19, 2017 · 5 comments

Comments

@vikaskmr1008
Copy link

We are trying to use the hello-world plugin described in this page - https://streamdata.io/blog/developing-an-helloworld-kong-plugin/

We are facing this error in logs:
2017/09/19 09:47:15 [error] 1#0: init_by_lua error: /usr/local/share/lua/5.1/kong.lua:154: hello-world plugin is in use but not enabled
stack traceback:
[C]: in function 'assert'
/usr/local/share/lua/5.1/kong.lua:154: in function 'init'
init_by_lua:3: in main chunk

The Kong version we are using is 0.11.0.

Can someone suggest what could we be missing?

@wuyachao
Copy link

1.vim /usr/local/share/lua/5.1/kong/templates/kong_defaults.lua +8
2.custom_plugins = hello-world 
3.kong restart

@Tieske
Copy link
Member

Tieske commented Sep 22, 2017

that message means the plugin "hello-world" is in use (eg. there is a reference in the database to it), but it is not enabled (eg. you did not define the custom_plugins configuration property).

do KONG_CUSTOM_PLUGINS=hello-world kong start

@Tieske Tieske closed this as completed Sep 22, 2017
@vikaskmr1008
Copy link
Author

I fixed this issue by adding things in custom_plugins and lua_package_path .

Here are the steps to enable and use custom plugin in kong Env.

1 - Add custom plugin name in --- custom_plugins = hello-world

2 - Install hello-world plugin by using following steps ---

If you have source code of your plugin then move into it and execute the command --- "luarocks make"

it will install your plugin.

now you have to execute a command "make install-dev" make sure your plugin have makefile like as --

enter image description here

Once you execute this command "make install-dev". it will create lua file at a location something like that -

/your-plugin-path/lua_modules/share/lua/5.1/kong/plugins/your-plugin-name/?.lua

just copy this path and add it into the kong configuration file in lua_package_path

Something like that --

lua_package_path=/your-plugin-path/lua_modules/share/lua/5.1/kong/plugins/your-plugin-name/?.lua

Now you done your job.

Just start kong -- kong start --vv

You will see that the plugin loaded into kong plugin env.

@enjoy

@arvind-d11
Copy link

What if , we. have deprecated the plugin hello-world and we have removed it from kong_plugins path , and post that we are getting this error , how to resolve in such scenarios ? @vikaskmr1008

@Tieske
Copy link
Member

Tieske commented Sep 13, 2021

remove all references in the config to the plugin, before removing the plugin itself. If you hit it anyway, temporarily add the plugin again, update the config and remove the plugin again.

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

4 participants