With Odoo-Trunk on a ubuntu precise64 box out of vagrant hashicorp/precise64 base box (on 18.05.2014 state)
File "/usr/share/pyshared/openerp/sql_db.py", line 502, in borrow
result = psycopg2.connect(dsn=dsn, connection_factory=PsycoConnection)
File "/usr/share/pyshared/psycopg2/__init__.py", line 179, in connect
connection_factory=connection_factory, async=async)
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"?
the corresponding __init__.py states a few lines above the line 179 in question:
"""
[...]
The basic connection parameters are:
- *dbname*: the database name (only in dsn string)
- *database*: the database name (only as keyword argument)
- *user*: user name used to authenticate
- *password*: password used to authenticate
- *host*: database host address (defaults to UNIX socket if not provided)
- *port*: connection port number (defaults to 5432 if not provided)
Using the *connection_factory* parameter a different class or connections
factory can be specified. It should be a callable object taking a dsn
argument.
Using *async*=True an asynchronous connection will be created.
Any other keyword parameter will be passed to the underlying client
library: the list of supported parameter depends on the library version.
"""
I tried to set as postgres-user PGHOST to localhost as suggested here: http://stackoverflow.com/questions/13868730/socket-file-var-pgsql-socket-s-pgsql-5432-missing-in-mountain-lion-os-x-ser
restarted psotgres -> same issue
in /var/run/postgresql there is a 9.1-main.pid
How to solve?