Hi, i’m trying to run kong migrations on Postgres using this docker container (kong:latest):
I’ve a docker-compose.yml with:
kong-migration:
image: kong:latest
command: kong migrations up --v
restart: on-failure
environment:
KONG_DATABASE: “postgres”
KONG_PG_HOST: “my_remote_server”
KONG_PG_DATABASE: “kong”
KONG_PG_USER: “my_username”
KONG_PG_PASSWORD: “my_password”
KONG_PG_SSL: “on”
KONG_PG_SSL_VERIFY: “on”
When i run it, i get the following:
$ docker-compose up
Recreating docker_kong-migration_1 … done
Attaching to docker_kong-migration_1
kong-migration_1 | 2021/02/04 13:19:52 [verbose] Kong: 2.3.1
kong-migration_1 | Error:
kong-migration_1 | /usr/local/share/lua/5.1/kong/cmd/migrations.lua:98: [PostgreSQL error] failed to retrieve PostgreSQL server_version_num: closed
kong-migration_1 | stack traceback:
kong-migration_1 | [C]: in function ‘assert’
kong-migration_1 | /usr/local/share/lua/5.1/kong/cmd/migrations.lua:98: in function ‘cmd_exec’
kong-migration_1 | /usr/local/share/lua/5.1/kong/cmd/init.lua:88: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:88>
kong-migration_1 | [C]: in function ‘xpcall’
kong-migration_1 | /usr/local/share/lua/5.1/kong/cmd/init.lua:88: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:45>
kong-migration_1 | /usr/local/bin/kong:9: in function ‘file_gen’
kong-migration_1 | init_worker_by_lua:48: in function <init_worker_by_lua:46>
kong-migration_1 | [C]: in function ‘xpcall’
kong-migration_1 | init_worker_by_lua:55: in function <init_worker_by_lua:53>
kong-migration_1 | 2021/02/04 13:19:52 [verbose] no config file found at /etc/kong/kong.conf
kong-migration_1 | 2021/02/04 13:19:52 [verbose] no config file found at /etc/kong.conf
kong-migration_1 | 2021/02/04 13:19:52 [verbose] no config file, skip loading
kong-migration_1 | 2021/02/04 13:19:52 [verbose] prefix in use: /usr/local/kong
kong-migration_1 | 2021/02/04 13:19:52 [verbose] preparing nginx prefix directory at /usr/local/kong
kong-migration_1 | 2021/02/04 13:19:52 [verbose] SSL enabled on
kong-migration_1 | 2021/02/04 13:19:52 [verbose] generating /usr/local/kong/ssl/kong-default.crt SSL certificate (
kong-migration_1 | 2021/02/04 13:19:52 [verbose] generating /usr/local/kong/ssl/kong-default-ecdsa.crt SSL certificate (
kong-migration_1 | 2021/02/04 13:19:52 [verbose] SSL enabled on
kong-migration_1 | 2021/02/04 13:19:52 [verbose] generating /usr/local/kong/ssl/admin-kong-default.crt SSL certificate (
kong-migration_1 | 2021/02/04 13:19:52 [verbose] generating /usr/local/kong/ssl/admin-kong-default-ecdsa.crt SSL certificate (
kong-migration_1 | 2021/02/04 13:19:52 [verbose] generating ffdhe2048 DH parameters
That is, it says:
[PostgreSQL error] failed to retrieve PostgreSQL server_version_num: closed
The systems and versions i’m using:
OS: Windows 10
Docker: 20.10.2, build 2291f61
PostgreSQL: 12.5
Kong: 2.3.1
Anyone can help me on that?
Thanks!