Kong 0.14.1 migration error

Hi,
I’m using postgres 9.6. When trying to do kong migrations up. Im getting below error:

/usr/local/share/lua/5.1/kong/cmd/migrations.lua:37: [postgres error] Error during migration 2015-01-12-175310_init_schema: ERROR: column “request_host” does not exist
stack traceback:
[C]: in function ‘assert’
/usr/local/share/lua/5.1/kong/cmd/migrations.lua:37: 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:48: in function <init_worker_by_lua:46>
[C]: in function ‘xpcall’
init_worker_by_lua:55: in function <init_worker_by_lua:53>

Could anyone help me with the above issue?

Thanks in Advance!

Hi ,

Can anyone please address this issue? I’m new to Kong.
More Details:
Im deploying single pod of Kong on Kubernetes.

Migration Yaml file:

apiVersion: batch/v1
kind: Job
metadata:
name: kong-migration
spec:
template:
metadata:
name: kong-migration
spec:
containers:
- name: kong-migration
image: kong_plugin:0.5
imagePullPolicy: IfNotPresent
env:
- name: KONG_NGINX_DAEMON
value: “off”
- name: KONG_PG_USER
value: “kong”
- name: KONG_PG_PASSWORD
value: “kong”
- name: KONG_PG_HOST
value: “10.244.0.47”
- name: KONG_PG_PORT
value: “5432”
- name: KONG_PG_DATABASE
value: “kong”
command: [ “/bin/sh”, “-c”, “kong migrations up --v” ]
restartPolicy: Never
backoffLimit: 8

Thanks in Advance!

  1. Does your migration job complete successfully?
  2. How are you creating the kong_plugin Docker image?

Hi,
I could see in the logs that migration has started but not ended. And my POD status is Error.

The docker image kong_plugin is nothing but the direct kong:0.14.1 docker image. I just renamed while loading the image into kubernetes.

Kong: 0.14.1
no config file found at /etc/kong/kong.conf
no config file found at /etc/kong.conf
no config file, skipping loading
prefix in use: /usr/local/kong
running datastore migrations
migrating core for database kong

Thanks
Rajashree

Could you please tell me what it is looking for ? request_host is any environment variable that I can send while running my pod?

“column “request_host” does not exist”

Whereas If i replace the 0.14.1 version with kong:latest image… the migration is successfull. And Kong pod is up and running.
I would like to use 0.14.1 particularly because it has ‘/api’ endpoint which is easy to configure.
But in latest version could not do successful routing for my angular application which is running in another pod.

I want the kong to route my app running on http://: through http:///
How can I achieve this scenario?

Could you please help me with any one of the above scenario?

Can you replace it with kong:0.14.1 and try?
Make sure to have a clean database and the postgres pod to be up and running.


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ