Skip to Content
Menu
This question has been flagged
1 Reply
4270 Views

 

2022-09-10 18:52:35,017 461 INFO ? odoo.addons.bus.models.bus: Bus.loop listen imbus on db postgres

2022-09-10 18:52:35,018 461 INFO ? odoo.sql_db: Connection to the database failed

2022-09-10 18:52:35,018 461 ERROR ? odoo.addons.bus.models.bus: Bus.loop error, sleep and retry

Traceback (most recent call last):

  File "/usr/lib/python3/dist-packages/odoo/addons/bus/models/bus.py", line 176, in run

    self.loop()

  File "/usr/lib/python3/dist-packages/odoo/addons/bus/models/bus.py", line 154, in loop

    with odoo.sql_db.db_connect('postgres').cursor() as cr:

  File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 678, in cursor

    return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)

  File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 250, in __init__

    self._cnx = pool.borrow(dsn)

  File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 561, in _locked

    return fun(self, *args, **kwargs)

  File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 627, in borrow

    result = psycopg2.connect(

  File "/usr/local/lib/python3.8/dist-packages/psycopg2/__init__.py", line 122, in connect

    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)

psycopg2.OperationalError: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory

                Is the server running locally and accepting connections on that socket?

Avatar
Discard
Best Answer

Hello MOSTAFA HELMY

Please Follow these steps:

1. Restart Postgres Server.

sudo systemctl restart postgresql.service


2. If above step doesn’t work then follow the below steps:

-sudo kill $(sudo lsof -t -i:5432)
- pg_lsclusters

if the port’s status is down then you need to restart the postgres service.

- sudo systemctl restart postgresql.service

I hope this will help you.

Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

Avatar
Discard
Related Posts Replies Views Activity
1
Nov 24
288
1
Nov 24
112
0
Nov 24
146
3
Oct 24
233
1
Sep 24
218