Encountered failed login error while running db migrations on Remote Postgres RDS

Run the container:
docker run -it
-e “KONG_DATABASE=postgres”
-e “KONG_PG_DATABASE=postgres”
-e “KONG_PG_USER=postgres”
-e “KONG_PG_PASSWORD=”
-e “KONG_PG_HOST=”
kong:1.3.0-alpine /bin/sh

then once inside the container run the below command:

kong migrations up -v which gives the below output.

2019/09/16 05:42:59 [verbose] Kong: 1.3.0
2019/09/16 05:42:59 [verbose] reading config file at /etc/kong/kong.conf
2019/09/16 05:42:59 [verbose] prefix in use: /usr/local/kong
Error:
/usr/local/share/lua/5.1/kong/cmd/migrations.lua:93: [PostgreSQL error] failed to retrieve server_version_num: FATAL: password authentication failed for user "postgres"
stack traceback:
	[C]: in function 'assert'
	/usr/local/share/lua/5.1/kong/cmd/migrations.lua:93: 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:9: 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>

Have already tested installing psql on the kong container which can connect to the AWS Rds database. Additionally have tried the config file params /etc/kong/kong.conf but nothing has changed.
Any suggestion why it would be happening?


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ