Thread: Network Connection

Network Connection

From
"Valter"
Date:
I have started postmaster and connected thru psql and that is ok.
 
But when I try to connect over the network I get a connection refused message, inquiring if server is running on port 5432.
 
I am using Mandrake Linux 9.2 and pgsql 7.3.4 (which cames with Mandrake)
 
Thanks
 
Valter
 

Re: Network Connection

From
Bill Moran
Date:
Valter wrote:
> I have started postmaster and connected thru psql and that is ok.
>
> But when I try to connect over the network I get a connection refused
> message, inquiring if server is running on port 5432.

You're most likely hitting one of two problems.  Either Postgres isn't
configured to listen for TCP connections, or Mandrake has a packet filter
enabled that's blocking them.

netstat -finet should tell you whether or not Postgres is listening on
the correct port.  If not, edit your postgresql.conf and restart the
server.  The lines you're looking for are tcpip_socket = false (change
it to "true") and "port = 5432"

If you still can't connect, then you'll have to find out what kind of
packet filter Mandrake is running and tweak it.

Once that works, you'll probably need to adjust the security model that
Postgres is using to authenticate users.  See pg_hba.conf in the same
directory as postgresql.conf

--
Bill Moran
Potential Technologies
http://www.potentialtech.com


Re: Network Connection

From
Paul Thomas
Date:
On 16/03/2004 19:20 Valter wrote:
> I have started postmaster and connected thru psql and that is ok.
>
> But when I try to connect over the network I get a connection refused
> message, inquiring if server is running on port 5432.
>
> I am using Mandrake Linux 9.2 and pgsql 7.3.4 (which cames with Mandrake)

Have you edited postgresql.conf to set tcpip_socket = true ? If this is
not done then you can't access the database using tcp/ip. Also, edit
pg_hba.conf to allow you connect from another machine. Remember to restart
the database afterwards.

HTH

--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for
Business             |
| Computer Consultants         |
http://www.thomas-micro-systems-ltd.co.uk   |
+------------------------------+---------------------------------------------+