1

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

  • As stated in the error message, are you sure that the version you've migrated from is the same as the version you're running afterward? In addition, why use an old version of Kong? – Ponsakorn30214 Dec 13 '22 at 13:36
  • Error says versions are not matching, did you try "kon migration up" command on your installation? – Shaleen Dec 13 '22 at 14:11

1 Answers1

1

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.

Aaron
  • 55,518
  • 11
  • 116
  • 132