Skip to Content
Menu
This question has been flagged
3 Replies
15748 Rodiniai

    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: could not connect to server: Connection refused
    Is the server running on host "localhost" (127.0.0.1) and accepting
    TCP/IP connections on port 5432? - - -

I'm trying to run odoo 13 on ubuntu 18.04 and i did that but when i tried to use it on pycharm it didn't work i first had issue with the io that already used and when i killed the old odoo process i had several issues i solved it but couldn't solve this one even after i edited pg_hba.conf file and restarted postgresql

Portretas
Atmesti
Autorius Best Answer

thank you Anisha

I solved the problem by creating new postgres user and add a password to the user using this command

createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo-13

and adding this password to the configuration file instead of False

but first i had delete and reinstall the postgres as it showed the same problem "is the server running on local host......." when i tried to create user create user


Portretas
Atmesti

Hello Mahmoud Ibrahim,

Great to know that your issue has been resolved. And yes issue was due to the some missing postgres details.

Thanks

Best Answer

Hello Mahmoud Ibrahim, 

I've read your issue;

You need to recheck config file of Postgres details

There is something invalid from db_host, db_user, db_port, db_password;

Regards

Anisha Bahukhandi

Technical Content Writer
Webkul

Portretas
Atmesti
Best Answer

Hello im having the same problem as you had, can you help me to solve it

Portretas
Atmesti