Search Postgresql Archives

Re: Starting PostgreSQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



admin wrote:
> Sorry folks, a perennial one I'm sure ...
> 
> I have read the manual and Googled for a couple of hours but still can't
> connect to PostgreSQL 8.3.4 (the PGDG RPMs running on an up to date
> CentOS 5.2).
> 
> I continually get this message:
> 
> psql: could not connect to server: No such file or firectory
> Is the server running locally and accepting
> connections on Unix domain socket "/tmp/.s.PDSQL.0"?
> 
> Yes, the server is running as 'ps -aux' and 'netstat -l' and 'service
> postgresql status' all confirm.

Do you mean you have something like this in your netstan -l?
unix  2      [ ACC ]     STREAM     LISTENING     12587  /tmp/.s.PGSQL.5432

note, this is on a linux box with postgresql in standard configuration.
Just look at the port number embedded in the socket name. I don't really
think you can run a process on port 0. I think your psql is looking for
the wrong socket.

Try:
$ psql -p 5432 ...

If you don't see any unix socket for PG (I don't even think that's possible),
then you need to use IP sockets:

$ psql -p 5432 -h localhost ...

> 
> service postgresql start/stop/restart works without errors
> pg_ctl start/stop/restart works without errors
> 
> There is no socket file in /tmp.

Opps sorry I missed this. Well double check with netstat, but it's
possible your PG is not configured for Unix sockets... even if I
wouldn't know how to do that.

I just checked a CentOS5.2 running PG and there it is:

$ ls -l /tmp/.s.PGSQL.5432
srwxrwxrwx 1 postgres postgres 0 Oct 13 01:22 /tmp/.s.PGSQL.5432

.TM.

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux