Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


[V9]postgresql connection error

on 6/27/16, 5:06 PM 206 views

Hi everyone

My first and new installation of 9.0 community

When I start odoo using my user and odoo.py it's ok

When I try with "service odoo start" I have a issue

  File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line 164, in connect
    conn = _connect(dsn, connection_factory=connection_factory, async=async)
OperationalError: FATAL:  password authentication failed for user "odoo"
FATAL:  password authentication failed for user "odoo"

So I delete the odoo user and crate a new one whith all permissions


But nothing change

what's the solution ?

On 6/28/16, 3:28 AM

thanks for your answeers

-> deep

I have no .openerp_serverrc file in my server

And I think postgre is in the good port because I can launch odoo from my user

is here my /etc/odoo/openerp-server.conf

; This is the password that allows database operations:
; admin_passwd = admin
db_host =
#db_host = "/tmp/.s.PGSQL.5432"
db_port = False
db_user = odoo
db_password = False
addons_path = /usr/lib/python2.7/dist-packages/openerp/addons


-> dilip

 odoo usr exist on postgresql

so I change /etc/postgresql/9.5/main/pg_hba.conf like this

# Database administrative login by Unix domain socket
local   all             postgres                                peer
local   all              odoo       		           trust

and nothing change

I try to bee clear

odoo is a user creat by odoo installation. It have no /home directory.


I uninstal odoo,  delete and clean postgresql.

I reinstall postrsql first and then odoo

And it's working out of the box

With my debian when I install odoo for the first time postgresql wasn't on my computer and it seems necessary to install postgresql first




| 5 4 7
Bengaluru, India

Techno-Functional Associate with 6+ years of experience in Odoo (formerly known as OpenERP).

On 6/28/16, 1:03 AM

Check in the .openerp_serverrc file,

In that whether you have specified db related setup correctly such as db_host, db_user, db_password, db_port.

Further check in which port does the postgreSQL is running, sometimes the postgre will be running in the port 5432 but Odoo server may be pointed to port 5433.

So in that case, if you wished to change the PostgreSQL port, then execute the below code in the terminal.

sudo -u postgres psql -p 5433 postgres

Dilip Dabhi
On 6/28/16, 1:02 AM

First open terminal in ubantu OS.

In that type following commands :

->  sudo su postgres

if user odoo is not created.

            ->   createuser -s user_name

-> psql template1

-> alter user postgres password 'newpassword';


go in following path :


 ->   sudo vi /etc/postgresql/9.3/main/pg_hba.conf




# Database administrative login by Unix domain socket

local        all              postgres            peer

local        all              odoo                  trust


# "local" is for Unix domain socket connections only





in above code add BOLD line

" local        all              odoo                  trust "


Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 6/27/16, 5:06 PM
Seen: 206 times
Last updated: 6/28/16, 3:28 AM