Unable to connect with psql 10.10 (could not connect to server: No such file or directory)
gamesguru opened this issue · 1 comments
Hi all,
love the work that's been done! I've just had one small issue, I think it's related to upgrading my Linux to postgres 10.10.
here's the error:
DBI connect('dbname=nutra','alephdog',...) failed: 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"? at /usr/bin/postgresql_autodoc line 260.
Unable to connect due to: 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"?
but when i run this, i have no issues:
psql postgresql://alephdog:@localhost:5432/nutra
System info:
ubuntu 18.04
psql/pg_ctl 10.10
Postgres Auto-Doc Version 1.40
Well, it's defaulting to look at a Unix domain socket (that's what's in /var/run/postgresql).
It sounds like the PostgreSQL instance doesn't have a Unix domain socket, or perhaps that it resides somewhere else.
If you specify a hostname via -h option, thus, say,
postgresql_autodoc -h localhost -p 5432 -d nutra
that should work better...
If the domain socket is in some other directory, then it seems like you have conflicting libpq libraries around with different ideas of where they go, the wrong one of which autodoc is using.