Unable to start kong gateway with custom plugin

223 views Asked by At

I am using kong gateway 0.11.2 with cassandra database version 2.2.7. I have written a custom plugin and I am trying to install the plugin manually. I hve made the necessary changes in the kong.conf file as per the official kong documentation to install the the plugin. I have rum the migrations up command which executed successfully. Post executing the migrations up I am unable to start the kong gateway with below error in the logs:

[error] 1#0: init_by_lua error: /usr/local/share/lua/5.1/kong/init.lua:149: [cassandra error] the current database schema does not match this version of Kong. Please run `kong migrations up` to update/initialize the database schema. Be aware that Kong migrations should only run from a single node, and that nodes running migrations concurrently will conflict with each other and might corrupt your database schema!
stack traceback:
        [C]: in function 'assert'
        /usr/local/share/lua/5.1/kong/init.lua:149: in function 'init'
        init_by_lua:3: in main chunk
nginx: [error] init_by_lua error: /usr/local/share/lua/5.1/kong/init.lua:149: [cassandra error] the current database schema does not match this version of Kong. Please run `kong migrations up` to update/initialize the database schema. Be aware that Kong migrations should only run from a single node, and that nodes running migrations concurrently will conflict with each other and might corrupt your database schema!
stack traceback:
        [C]: in function 'assert'
        /usr/local/share/lua/5.1/kong/init.lua:149: in function 'init'
        init_by_lua:3: in main chunk

Kong version: 0.11.2 Cassandra version: 2.2.7

Installing a custom plugin in kong

1

There are 1 answers

0
Aaron On

It's likely that the problem is related to this Git Issue in the Kong project #1294: Cassandra 3.x Support.

Cassandra 2.2 still uses the old system.schema_keyspaces structure, while Cassandra 3.x+ uses new system_schema.keyspaces approach.

Basically, it looks like that version of Kong requires Cassandra 3.x or higher.