KPI 'password authentication failed for user' error

Why this happens:
This error happens when the postgres password is changed from the ./run.py --setup prompt. The postgres docker container does not update alongside this change in the run.py command.

KPI will keep attempting to connect to postgres resulting in this error repeating itself in ./run.py --logs:
kpi_1 | psql: FATAL: password authentication failed for user "<username>".

How to fix it:
If this error happens the only way (so far) to fix it is to manually change the database password from inside the docker container.

Navigate to the postgres data container by doing the following:

  1. Typing docker ps into the command line and find the name of the container containing “postgres
  2. Run the following in the command line: docker exec -it <postgres docker name> bash
  3. Open the psql database with psql -U <username> -d <your-database-name> and run ALTER USER <username> WITH ENCRYPTED PASSWORD '<the changed password>';

If you don’t remember the changed postgres password it changed to it’s located in kobo-install/.run.conf.

2 Likes

Hi @duvld,

Welcome to the community! Thank you for sharing this wonderful information to the entire community and making the forum rich with documentation to sort out issues related with KoBoToolbox.

Have a great day!

hi, help me.