Database needs bootstrap; run 'kong migrations bootstrap'

#1

Hi I running KONG in kubernetes.

for 6 month our Kong pod is OK and doesn’t has an error. But today my kong pod already crash and we try to fix it by build a new pod. But we got following error :

2019/03/30 05:41:23 [error] 1#0: init_by_lua error: /usr/local/share/lua/5.1/kong/init.lua:337: database needs bootstrap; run 'kong migrations bootstrap'
stack traceback:
    [C]: in function 'error'
    /usr/local/share/lua/5.1/kong/init.lua:337: 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:337: database needs bootstrap; run 'kong migrations bootstrap'
stack traceback:
    [C]: in function 'error'
    /usr/local/share/lua/5.1/kong/init.lua:337: in function 'init'
    init_by_lua:3: in main chunk

I’ve read similar cases like this. and they said this is a bug in kong version 1.0.x.
Then we try to upgrading our version to 1.1.1 and still got same error.

this is our simple yml

spec:
     containers:
     - name: prd-kong
       image: kong:1.1.1
       env:

really appreciate the answers and suggestions

0 Likes

#2

Hi @widada

Did you upgrade your Kong cluster before you got this error? You need to run kong migrations bootstrap only once in the entire lifecycle of a database for Kong.

0 Likes