kong migrations bootstrap Error
- Dominant language
- Shell
- Stars
- 1.5k
- Forks
- 849
- PR merge metrics
- No merged PRs in 30d
Description
I tried to run kong followed the docs on https://docs.konghq.com/gateway/latest/install/docker/.
And when I execute the following command, it failed with the following errors.
```
[root@localhost ~]# docker network create kong-net
e7423602c16e0fd07c27326f177a2e02196370d2a83353dccff3d5f1a82904f4
[root@localhost ~]#
[root@localhost ~]# docker run -d --name kong-database \
> --network=kong-net \
> -p 5432:5432 \
> -e "POSTGRES_USER=kong" \
> -e "POSTGRES_DB=kong" \
> -e "POSTGRES_PASSWORD=kongpass" \
> postgres:13
3f4be3f294944dee2df65d58181eb82389c9a73b66274095efe007302a06a149
[root@localhost ~]# docker run --rm --network=kong-net \
> -e "KONG_DATABASE=postgres" \
> -e "KONG_PG_HOST=kong-database" \
> -e "KONG_PG_USER=kong" \
> -e "KONG_PG_PASSWORD=kongpass" \
> -e "KONG_PASSWORD=test" \
> kong/kong-gateway:3.2.1.0 kong migrations bootstrap --v
2023/03/09 02:32:20 [verbose] Kong: 3.2.1.0-enterprise-edition
2023/03/09 02:32:20 [verbose] no config file found at /etc/kong/kong.conf
2023/03/09 02:32:20 [verbose] no config file found at /etc/kong.conf
2023/03/09 02:32:20 [verbose] no config file, skip loading
2023/03/09 02:32:20 [verbose] prefix in use: /usr/local/kong
2023/03/09 02:32:20 [verbose] preparing nginx prefix directory at /usr/local/kong
2023/03/09 02:32:20 [verbose] SSL enabled on
2023/03/09 02:32:20 [verbose] generating /usr/local/kong/ssl/kong-default.crt SSL certificate (
2023/03/09 02:32:20 [verbose] generating /usr/local/kong/ssl/kong-default-ecdsa.crt SSL certificate (
2023/03/09 02:32:20 [verbose] SSL enabled on
2023/03/09 02:32:20 [verbose] generating /usr/local/kong/ssl/admin-kong-default.crt SSL certificate (
2023/03/09 02:32:21 [verbose] generating /usr/local/kong/ssl/admin-kong-default-ecdsa.crt SSL certificate (
2023/03/09 02:32:21 [verbose] SSL enabled on
2023/03/09 02:32:21 [verbose] generating /usr/local/kong/ssl/admin-gui-kong-default.crt SSL certificate (
2023/03/09 02:32:21 [verbose] generating /usr/local/kong/ssl/admin-gui-kong-default-ecdsa.crt SSL certificate (
2023/03/09 02:32:21 [verbose] generating trusted certs combined file in
Error:
/usr/local/share/lua/5.1/kong/cmd/migrations.lua:222:
stack traceback:
[C]: in function 'assert'
/usr/local/share/lua/5.1/kong/cmd/migrations.lua:222: in function 'cmd_exec'
/usr/local/share/lua/5.1/kong/cmd/init.lua:104: in function
[C]: in function 'xpcall'
/usr/local/share/lua/5.1/kong/cmd/init.lua:104: in function
/usr/local/bin/kong:9: in function 'file_gen'
init_worker_by_lua:48: in function
[C]: in function 'xpcall'
init_worker_by_lua:55: in function
[root@localhost ~]#
[root@localhost ~]# docker ps|grep kong
3f4be3f29494 postgres:13 "docker-entrypoint.s…" 4 minutes ago Up 4 minutes 0.0.0.0:5432->5432/tcp kong-database
[root@localhost ~]# docker ps -a|grep kong
3f4be3f29494 postgres:13 "docker-entrypoint.s…" 4 minutes ago Up 4 minutes 0.0.0.0:5432->5432/tcp kong-database
6698c1a3f490 kong/kong-gateway:3.2.1.0 "/entrypoint.sh kong…" 32 minutes ago Exited (1) 32 minutes ago kong-gateway
[root@localhost ~]#
[root@localhost ~]# docker --version
Docker version 19.03.13, build 4484c46d9d
[root@localhost ~]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
[root@localhost ~]#
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the commands from the Docker installation documentation with postgres:13 and kong/kong-gateway:3.2.1.0, then inspect the failure at /usr/local/share/lua/5.1/kong/cmd/migrations.lua:222. Done means identifying why migrations bootstrap exits with status 1 and documenting or validating a fix for this environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, linux, postgresql
- Domain
- databases, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100