Account Links: Cart | Your Account | Logout

Skip to content

Red Hat Knowledgebase

Red Hat Knowledgebase Search:

Updated Within the Last:

New Solutions within the last day New Solutions within the last week New Solutions within the last month

Browse by topics:


Click to View a Topic
Red Hat Enterprise Linux > AS/ES/WS v. 3 > Issue <<  472 of 594 >>

Solution Tools:


Email a Solution Postcard Printer version Submit a comment on this answer Update notifications Request an answer Back

Article Reference

Article ID: 5117
Last update: 05-11-06
Issue:
Why are clients receiving an error message when trying to connect, after starting the PostgreSQL service?
Resolution:

Release Found: Red Hat Enterprise Linux 3

Symptom:
The PostgreSQL service has been started. When clients attempt to connect to the server, they receive an error message similar to:

psql: could not connect to server: Connection refused
  Is the server running on host host.domain.com and accepting
  TCP/IP connections on port 5432?

Solution:
By default, the PostgreSQL service only allows connections to the database from the local machine. To enable clients to connect from different hosts, first add the following line to the bottom of the /var/lib/pgsql/data/pg_hba.conf file:

host    all    all   ip_address  subnet_mask  trust

replacing ip_address and subnet_mask to reflect the network IP address range of the clients.

Add the following line to the /var/lib/pgsql/postgresql.conf file:

tcpip_socket = true

Restart the service with:

# service rhdb restart

Clients should now be able to connect to the PostgreSQL service over the default port (5432).


How well did this entry answer your question?


good wrong incomplete out of date
Red Hat Enterprise Linux > AS/ES/WS v. 3 > Issue <<   472  of  594  >>