Search code examples
pythonpostgresqlodooodoo-10

OperationalError: could not connect to server. Error while launching odoo


I am getting this error when trying to run odoo 10:

OperationalError: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

Solution

  • Just to help others facing same issue, I solved this by following these steps first i killed all the running processes

    ps ax | grep odoo
    
    sudo kill -9 (process_id)
    

    then I checked the postgresql status and restarted the postgresql.

    sudo /etc/init.d/postgresql status
    
    sudo /etc/init.d/postgresql restart
    

    And the issue was successfully resolved!