Skip to Content
Menu
This question has been flagged
4 Replies
5030 Views
After giving  this command this error shows up""odoo start --config=/etc/odoo/odoo.conf -i HelloModule""
2019-07-16 11:39:43,305 25218 INFO ? odoo: Odoo version 11.0-20190704
2019-07-16 11:39:43,305 25218 INFO ? odoo: Using configuration file at /etc/odoo/odoo.conf
2019-07-16 11:39:43,305 25218 INFO ? odoo: addons paths: ['/home/ahmed/.local/share/Odoo/addons/11.0', '/usr/lib/python3/dist-packages/odoo/addons', '/home/ahmed/Documents/odoo/addons']
2019-07-16 11:39:43,306 25218 INFO ? odoo: database: odoo@default:5432
2019-07-16 11:39:43,307 25218 INFO ? odoo.sql_db: Connection to the database failed
Traceback (most recent call last):
File "/usr/bin/odoo", line 8, in <module>
odoo.cli.main()
File "/usr/lib/python3/dist-packages/odoo/cli/command.py", line 60, in main
o.run(args)
File "/usr/lib/python3/dist-packages/odoo/cli/start.py", line 78, in run
main(cmdargs)
File "/usr/lib/python3/dist-packages/odoo/cli/server.py", line 140, in main
odoo.service.db._create_empty_database(db_name)
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 95, in _create_empty_database
with closing(db.cursor()) as cr:
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 637, in cursor
return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 178, in __init__
self._cnx = pool.borrow(dsn)
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 520, in _locked
return fun(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 588, in borrow
**connection_info)
File "/usr/lib/python3/dist-packages/psycopg2/__init__.py", line 164, in connect
conn = _connect(dsn, connection_factory=connection_factory, async=async)
psycopg2.OperationalError: FATAL: Peer authentication failed for user "odoo"
Avatar
Discard

Could not create database `addons`. (fe_sendauth: no password supplied
)

Now this error is comming up.

Best Answer

If you want access to postgres from another computer on the same network, You can use:

# IPv4 local connections:
#host    all             all             127.0.0.1/32            md5
host    all             all             samenet                 password
Remember to restart postgres after changed pg_hba.conf, in Debian:

systemctl restart postgresql

Avatar
Discard
Best Answer

If you do not know how to configure the components and requirements properly on your environment, you should read the documentation first, know the components and configure them properly. If you want to avoid that effort, use the Odoo package installer and all this is done automatically.

Avatar
Discard
Best Answer


Hi,

You need to change  pg_hba.conf configuration. This error means that you are using peer authentication, so you need to change it for md5 .

just go through this link : http://www.postgresql.org/docs/9.4/static/auth-pg-hba-conf.html

change 

local all all peer

to 

local all all md5

    

Avatar
Discard