Postgres database 'kong' is missing migration

root@dn-apim:~# kong start --v
2018/09/24 05:57:55 [verbose] Kong: 0.14.1
2018/09/24 05:57:55 [verbose] reading config file at /etc/kong/kong.conf
2018/09/24 05:57:55 [verbose] prefix in use: /usr/local/kong
2018/09/24 05:57:55 [verbose] preparing nginx prefix directory at /usr/local/kong
2018/09/24 05:57:55 [verbose] Admin SSL enabled, no custom certificate set: using default certificate
2018/09/24 05:57:55 [verbose] admin SSL certificate found at /usr/local/kong/ssl/admin-kong-default.crt
2018/09/24 05:57:55 [warn] ulimit is currently set to “1024”. For better performance set it to at least “4096” using “ulimit -n”
2018/09/24 05:57:55 [verbose] could not start Kong, stopping services
2018/09/24 05:57:55 [verbose] stopped services
Error:
/usr/local/share/lua/5.1/kong/cmd/start.lua:71: /usr/local/share/lua/5.1/kong/cmd/start.lua:60: nginx: [warn] [lua] log.lua:63: log(): postgres database ‘kong’ is missing migration: (dn-api) 2018-09-21-001-config_lookup
nginx: [error] init_by_lua error: /usr/local/share/lua/5.1/kong/init.lua:200: [postgres 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:200: 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:71: 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:47: in function <init_worker_by_lua:45>
[C]: in function ‘xpcall’
init_worker_by_lua:54: in function <init_worker_by_lua:52>

Found solution here - https://github.com/Kong/kong/issues/3394

Hello @tejas3190 To better help the community, could you mark your post as “Solved” by accepting the link you posted above? Thanks in advance!

1 Like