To start I had Kong 0.14.1 installed (without docker) in ubuntu 16.04 working fine.
I tried adding the ‘Session’ plugin (following the plugin page’s example)
curl -X POST http://localhost:8001/services/1d57a271-1a70-42ac-bb37-2e60405af347/plugins \
--data "name=session" \
--data "config.storage=kong" \
--data "config.cookie_secure=false"
But it just returned the 400 error:
{"message":"schema violation (name: plugin 'session' not enabled; add it to the 'plugins' configuration property)","name":"schema violation","fields":{"name":"plugin 'session' not enabled; add it to the 'plugins' configuration property"},"code":2}
I realized that session plugin was not included in my current version and so I attempted to upgrade to the latest (1.1.2) with these commands:
sudo dpkg -P kong-community-edition
wget -O kong-community-edition-1.1.2.trusty.all.deb https://bintray.com/kong/kong-community-edition-deb/download_file?file_path=dists/kong-community-edition-1.1.2.trusty.all.deb
sudo dpkg -i kong-community-edition-1.1.2.*.deb
sudo kong migrations up
sudo kong migrations finish
followed by a system restart just to be sure.
Now when i run the following i can see I’m on the latest version 1.1.2
dpkg -l | grep kong
But I still get the same error when trying to enable the package.
I did get the following error when uninstalling kong with ‘sudo dpkg -P kong-community-edition’, but I’m not sure how to handle this warning, or if it is even relevant to my issue.
Removing kong-community-edition (1.1.2) ...
dpkg: warning: while removing kong-community-edition, directory '/usr/local/lib' not empty so not removed
dpkg: warning: while removing kong-community-edition, directory '/usr/local/bin' not empty so not removed
dpkg: warning: while removing kong-community-edition, directory '/usr/local/share' not empty so not removed
dpkg: warning: while removing kong-community-edition, directory '/usr/local/kong' not empty so not removed
What should I correct to allow me to enable the session plugin?