Thread: Cannot connect to server
Hi,
I am attempting to 'add a connection' to the postgres database using pgadminlll v_1.8.4, postgresql v 8.3.3 - 1 with PostGis 1.3.3 on Mac OS 10.5.4.
After an initial installation it may connect successfully for a couple of days before I'm unable to connect anymore. It is always the same pattern.
I've tried the recommendations offered on the postgresql community pages but nothing seems to work. I've made the usual changes to:
postgreql.conf ('*' instead of 'localhost')
pg_hba.conf
but cannot get any further than this error:-
Error connecting to the server: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
--
Paul J. Shapley
2008/9/5 Paul Shapley <p.shapley@gmail.com>: > Hi, > > > > I am attempting to 'add a connection' to the postgres database using > pgadminlll v_1.8.4, postgresql v 8.3.3 - 1 with PostGis 1.3.3 on Mac OS > 10.5.4. > > > > After an initial installation it may connect successfully for a couple of > days before I'm unable to connect anymore. It is always the same pattern. > > > > I've tried the recommendations offered on the postgresql community pages but > nothing seems to work. I've made the usual changes to: > > > > postgreql.conf ('*' instead of 'localhost') > > pg_hba.conf > > > but cannot get any further than this error:- > > > > > > Error connecting to the server: could not connect to server: No such file or > directory > > Is the server running locally and accepting > > connections on Unix domain socket "/tmp/.s.PGSQL.5432"? the question included in above error message is quite important. is the server running (see process list, ps ax | grep postgres) does the socket file exist? (see filesystem, ls -l /tmp/.s.PGSQL.5432) it's possible that the client tries to connect via non-existing socket. it happens when server config is different from compiled-in defaults for socket location. in this case try to connect via TCP, this should help. > > -- > Paul J. Shapley -- Filip Rembiałkowski
On Fri, 2008-09-05 at 11:44 +0200, Filip Rembiałkowski wrote: > > is the server running (see process list, ps ax | grep postgres) > does the socket file exist? (see filesystem, ls -l /tmp/.s.PGSQL.5432) Since you say things work for several days, then stop -- make sure there's no braindead automated cleanup of /tmp that is removing /tmp/.s.PGSQL.5432 > > it's possible that the client tries to connect via non-existing > socket. it happens when server config is different from compiled-in > defaults for socket location. > > in this case try to connect via TCP, this should help