Re: DB Error: connect failed - Mailing list pgsql-novice

From Tom Lane
Subject Re: DB Error: connect failed
Date
Msg-id 12790.1107412951@sss.pgh.pa.us
Whole thread Raw
In response to Re: DB Error: connect failed  ("Rodolfo J. Paiz" <rpaiz@simpaticus.com>)
Responses Re: DB Error: connect failed [SOLVED]
List pgsql-novice
"Rodolfo J. Paiz" <rpaiz@simpaticus.com> writes:
> Now I get this as an error message:

> Standard Message: DB Error: connect failed
> Standard Code: -24
> DBMS/User Message: [nativecode=Unable to connect to PostgreSQL server:
> could not connect to server: Connection refused Is the server running on
> host localhost and accepting TCP/IP connections on port 5432?] ** Array

This generally means either that the server isn't listening for TCP
connections (did you turn on tcpip_socket or use -i switch?) or that
the kernel is filtering TCP connection attempts (check firewall rules
for localhost connections).

> I do know the database is running, as I can use it with both psql and
> phpPgAdmin. So, just the web page fails. Now to figure out how.

Dunno about phpPgAdmin, but psql defaults to connecting through a Unix
socket, which doesn't have either of the above risks.

            regards, tom lane

pgsql-novice by date:

Previous
From: "Rodolfo J. Paiz"
Date:
Subject: Re: DB Error: connect failed
Next
From: Michael Fuhr
Date:
Subject: Re: [PERFORM] Accessing insert values in triggers