Error when runing sentry upgrade command


I will be so grateful if someone can help me with this issue.
I get this error when I run the command “sentry upgrade” command. the error is :

django.db.utils.OperationalError: FATAL: Peer authentication failed for user “sentry”

I guess that it’s an issue with authentication to the database but I’ve already created a user called sentry who has the right to login and create databases. and I test it with this command #su - sentry -c “createdb -E utf-8 sentry” which runs without any error.

All the other components are running correctly (redis, rabbitmq).

Thanks in advance

This is purely related to your configuration of Postgres. Double check credentials and check your pg_hba.conf file for Postgres to make sure it’s allowing connections correctly from peer. This might require some debugging in your own or learning a bit more about Postgres.