Could not start Kong, stopping services


We have a service kong-community-edition-0.13.1-1 with cassandra-3.11.2-1, selinux/iptables disabled.

On 01/16/2024 we restarted the kong service because it was behaving strangely (we created a new API and it was not communicating with the upstreams), since then the service has not started, as shown below:

2024/01/17 11:38:45 [debug] starting nginx: /usr/local/openresty/nginx/sbin/nginx -p /usr/local/kong -c nginx.conf
2024/01/17 11:38:51 [verbose] could not start Kong, stopping services
2024/01/17 11:38:51 [verbose] stopped services
/usr/local/share/lua/5.1/kong/cmd/start.lua:68: /usr/local/share/lua/5.1/kong/cmd/start.lua:57: nginx: [error] init_by_lua error: /usr/local/share/lua/5.1/kong/core/handler.lua:98: attempt to concatenate local ‘err’ (a nil value)
stack traceback:
/usr/local/share/lua/5.1/kong/core/handler.lua:98: in function ‘build_router’
/usr/local/share/lua/5.1/kong/init.lua:182: in function ‘init’
init_by_lua:3: in main chunk

stack traceback:
[C]: in function ‘error’
/usr/local/share/lua/5.1/kong/cmd/start.lua:68: in function ‘cmd_exec’
/usr/local/share/lua/5.1/kong/cmd/init.lua:87: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:87>
[C]: in function ‘xpcall’
/usr/local/share/lua/5.1/kong/cmd/init.lua:87: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:44>
/usr/local/bin/kong:7: in function ‘file_gen’
init_worker_by_lua:49: in function <init_worker_by_lua:47>
[C]: in function ‘xpcall’
init_worker_by_lua:56: in function <init_worker_by_lua:54>

We verified that no files had been modified recently.

We verified that the cassandra database is in NORMAL status and all kong tables are available.

We tried to upgrade to the Kong 15 version, the upgrade worked, but the service still didn’t start.

Could you please help us?

We were able to solve the issue, thank you.
I will try to summarize what we did for future searches

  1. we login in cassandra database
    cqlsh -u cassandra -p

  2. use kong;

  3. select * from services;

  4. select * from routes;

  5. describe table routes;
    partition text,
    id uuid,
    created_at timestamp,
    hosts list,
    methods set,
    paths list,
    preserve_host boolean,
    protocols set,
    regex_priority int,
    service_id uuid,
    strip_path boolean,
    updated_at timestamp,

  6. With the results, we identify recent service and route creations by creation date.

  7. and then delete by id

delete from routes where partition=‘routes’ and id=1837d069-fbe8-42e6-a6e3-1c8f206b93af;
delete from services where partition=‘services’ and id=c8050a04-1b04-4bcd-b6e1-a2b998caf8f6;

“pousou na lua”