0

i am running an odoo instance on port 8069 with database user odoo. Now i am trying to run another instance on a different port. So i created a new postgres user named project .Below is my odoo conf file.

[options]
; This is the password that allows database operations:
admin_passwd = myadmin
db_host = False
db_port = False
db_user = project
db_password = False
addons_path =/opt/odoo/proj/odoo/addons/,/opt/odoo/proj/custom_addons/
log_level = info
logfile = /var/log/odoo/proj-server.log
log_handler = ["[':INFO']"]
xmlrpc_port = 8070

I am getting Internal server error and my log says "psycopg2.OperationalError: FATAL: Peer authentication failed for user "project" - - -. " I understand that something is wrong with the new user project, that i created. How should i make changes to the new user so that the error gets fixed?

p.ry
  • 101
  • 3

1 Answers1

1

The database logon is denied to your new user by the rules in PostgreSQL pg_hba.conf, given the empty db_host (local connection through Unix domain sockets) and db_password (passwordless connection)

What's needed:

  • figure out what security policy should apply to that user: from where is it allowed to connect, to which database(s), and whether a password is required.
  • edit pg_hba.conf accordingly.
  • edit the Odoo options db_host and db_password accordingly.
  • reload the postgresql service.
Daniel Vérité
  • 2,740
  • 14
  • 19