تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
452 أدوات العرض

Hello Community, I'm new here.

I'm doing an experiment with local Odoo, I finished the installation using the manual, however, when I open it in the browser, localhost:8069 opens the web screen asking me to create and configure some database data, I've already entered all the data.

In any possible way, he returns the following error to me.


Database creation error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "root" does not exist


Estou usando a versao 17

الصورة الرمزية
إهمال
الكاتب أفضل إجابة

Hi, thanks for the feedback, I had already done the restart of the service before, both with Postgres and with Odoo itself.


The Web screen asks me to configure the following data


1- Master key

2-Database Name

3-Email

4-Password

5 - Phone Number

6- Language

7- Country

I fill in the data and I get the error I listed above.


/nano /etc/odoo/odoo.conf


About the settings. Continue with this one.

For the odoo.conf file


I have the following output


/[options]

; This is the password that allows database operations:

; admin_passwd = admin

db_host = False

db_port = False

db_user = odoo

db_password = senha_usuario_odoo

;addons_path = /usr/lib/python3/dist-packages/odoo/addons

default_productivity_apps = True

Inside the post I have this output for the command

\du

sudo -u postgres psql

psql (16.4 (Ubuntu 16.4-0ubuntu0.24.04.2))

Type "help" for help.


postgres=# \du

                             List of roles

Role name |                         Attributes

-----------+------------------------------------------------------------

odoo      | Superuser, Create DB

odooNS    | Create DB

postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS


postgres=#






الصورة الرمزية
إهمال

please add db_port = 5432 and after restart odoo services and check again

الكاتب

Adjusted the port, restarted the service, the error still persisted!

أفضل إجابة

Hello Bruno, 

 First try to restart postgres services :

sudo service postgresql restart

otherwise Kindly review your odoo config file and check the odoo user password. 

If user not exit in case 

sudo -u postgres createuser -s username
sudo su postgres
psql
alter user username with password 'password';
\q
exit


Thanks.

الصورة الرمزية
إهمال