I am getting following error, when I tried to start Kong in Ubuntu
kong start [-c /path/to/kong.conf]
prefix directory /usr/local/kong not found, trying to create it
2017/11/05 21:11:41 [warn] ulimit is currently set to "1024". For better performance set it to at least "4096" using "ulimit -n"
Error: /usr/local/share/lua/5.1/pgmoon/init.lua:271: missing password, required for connect
Am I missing anything?
Kong is an open source API gateway and platform that acts as middleware between compute clients and the API-centric applications. The platform easily extends the capabilities of APIs with the use of plugins.
on your psql run the following.
CREATE USER kong; CREATE DATABASE kong OWNER kong;
ALTER USER kong WITH PASSWORD 'password';
create a kong.config with following content.
pg_user = kong
pg_password = password
Run the migration and start kong (might require sudo)
$ kong migrations up -c kong.config
$ kong start -c kong.config
your command is right, you just have to remove the "[
" from the commands. That's an indication of optional argument in the kong-documentaion.
So the right command would just be:
kong start -c /path/to/your/kong.conf
Make sure to have updated and uncommented out the following fields in the kong.conf
beforehand:
database = postgres (as in your case)
pg_host = your_host_address (127.0.0.1 by default)
pg_port = your_psql_port_address (5432 by default)
pg_user = your_psql_db_user (kong as per documentation of kong)
pg_password = your_psql_db_user's_password
pg_database = your_db_for_kong (kong as per documentation of kong)
If the proposed solution helped you, kindly close the question by accepting it as the answer. Thanks!
I have the same error, probably that your postgresql version is too old :
kong start -c kong.conf Error: [postgres error] Kong requires PostgreSQL 9.5 or greater (currently using 9.2)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With