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:
- Typing
docker ps
into the command line and find the name of the container containing “postgres
” - Run the following in the command line:
docker exec -it <postgres docker name> bash
- Open the
psql
database withpsql -U <username> -d <your-database-name>
and runALTER 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
.