pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Configure foreign host for PostgreSQL 8.0.3 on WindowsXP
5+ messages / 4 participants
[nested] [flat]

* Configure foreign host for PostgreSQL 8.0.3 on WindowsXP
@ 2005-09-28 07:33 Todd Rockhold <toduro@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Todd Rockhold @ 2005-09-28 07:33 UTC (permalink / raw)
  To: pgsql-admin

Installed PostgreSQL 8.0.3 on WindowsXP. Have not been able to configure so
that a client program running on a different WindowsXP box can connect to
the PostgreSQL database.

As I understand the documentation, at least one of the following
configurations should work, but none do. What have I done wrong and how can
I configure so that a connection can be successfully made?


1) The postgresql.conf file has (with everything else being the installation
default values):

listen_addresses = '*'

2) None of the following configurations of the pg_hba.conf file worked (the
program runs on 192.168.2.120 <http://192.168.2.120;):

# IPv4 local connections:
#host all all 127.0.0.1/32 <http://127.0.0.1/32; md5
host all all 192.168.2.120/24 <http://192.168.2.120/24; md5

# IPv4 local connections:
#host all all 127.0.0.1/32 <http://127.0.0.1/32; md5
host all all 192.168.2.120 <http://192.168.2.120;
255.255.255.255<http://255.255.255.255>md5

# IPv4 local connections:
host all all 127.0.0.1/32 <http://127.0.0.1/32; md5
host all all 192.168.2.120/24 <http://192.168.2.120/24; md5

# IPv4 local connections:
host all all 127.0.0.1/32 <http://127.0.0.1/32; md5
host all all 192.168.2.120 <http://192.168.2.120;
255.255.255.255<http://255.255.255.255>md5

I have a Symantec personal firewall installed which I turned off during
testing.

The program runs fine on localhost.

Am using the Npgsql .NET library. The Npgsql.Npgsql.Open() call throws an
exception, the error text of which is "System.Net.Sockets.SocketException:
NO connection could be made because the target machine actively refused it."

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Configure foreign host for PostgreSQL 8.0.3 on WindowsXP
@ 2005-09-28 08:14 Magnus Hagander <mha@sollentuna.net>
  2005-09-28 12:57 ` Re: Configure foreign host for PostgreSQL 8.0.3 on WindowsXP Dario <dario_d_s@unitech.com.ar>
  0 siblings, 1 reply; 5+ messages in thread

From: Magnus Hagander @ 2005-09-28 08:14 UTC (permalink / raw)
  To: Todd Rockhold <toduro@gmail.com>; pgsql-admin

> Installed PostgreSQL 8.0.3 on WindowsXP.  Have not been able 
> to configure so that a client program running on a different 
> WindowsXP box can connect to the PostgreSQL database. 
> 
> As I understand the documentation, at least one of the 
> following configurations should work, but none do.  What have 
> I done wrong and how can I configure so that a connection can 
> be successfully made?
> 
> 
> 1) The postgresql.conf file has (with everything else being 
> the installation default values): 
> 
> listen_addresses = '*'
> 
> 2) None of the following configurations of the pg_hba.conf 
> file worked (the program runs on 192.168.2.120):
> 
> # IPv4 local connections:
> #host    all         all         127.0.0.1/32          md5
> host    all         all            192.168.2.120/24       md5
> 
> # IPv4 local connections:
> #host    all         all         127.0.0.1/32          md5
> host    all         all            192.168.2.120 
> 255.255.255.255       md5
> 
> # IPv4 local connections:
> host    all         all         127.0.0.1/32          md5
> host    all         all         192.168.2.120/24       md5
> 
> # IPv4 local connections:
> host    all         all         127.0.0.1/32          md5
> host    all         all            192.168.2.120 
> 255.255.255.255       md5
> 
> I have a Symantec personal firewall installed which I turned 
> off during testing. 
> 
> The program runs fine on localhost.
> 
> Am using the Npgsql .NET library.  The Npgsql.Npgsql.Open() 
> call throws an exception, the error text of which is 
> "System.Net.Sockets.SocketException: NO connection could be 
> made because the target machine actively refused it."

Check:
1) the listen_address='*' didn't "take". Make sure you remembered to
remove the comment sign (yup, i've seen that mistake manu times). Also,
you need to restart the service after you've changed that, perhaps you
forgot it?
2) Is there any chance that the postmaster is running on a non-default
port? Or that the client is connecting on a non-standard port?
3) Verify that the IP Npgsql connects to is correct. If you're using a
DNS name, make sure it resolves right.

If all those look right, run a "netstat -na" on the commandline and see
if there is a listener to port 5432 and what IP that one is bound to.

//Magnus



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Configure foreign host for PostgreSQL 8.0.3 on WindowsXP
  2005-09-28 08:14 Re: Configure foreign host for PostgreSQL 8.0.3 on WindowsXP Magnus Hagander <mha@sollentuna.net>
@ 2005-09-28 12:57 ` Dario <dario_d_s@unitech.com.ar>
  0 siblings, 0 replies; 5+ messages in thread

From: Dario @ 2005-09-28 12:57 UTC (permalink / raw)
  To: pgsql-admin

this line
 host    all         all            192.168.2.120/24       md5
                                    ----------------

makes no sense to me, and probably neither to postgresql, it should be:
192.168.2.120/32       # if 192.168.2.120 is your client, this should be
enough
or
192.168.2.0/24         # if you wanted to allow all host in subnet to
validate thru md5, use this


long life, little spam and prosper.

-----Mensaje original-----
De: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org]En nombre de Magnus Hagander
Enviado el: miercoles, 28 de septiembre de 2005 5:14
Para: Todd Rockhold; pgsql-admin@postgresql.org
Asunto: Re: [ADMIN] Configure foreign host for PostgreSQL 8.0.3 on
WindowsXP


> Installed PostgreSQL 8.0.3 on WindowsXP.  Have not been able
> to configure so that a client program running on a different
> WindowsXP box can connect to the PostgreSQL database.
>
> As I understand the documentation, at least one of the
> following configurations should work, but none do.  What have
> I done wrong and how can I configure so that a connection can
> be successfully made?
>
>
> 1) The postgresql.conf file has (with everything else being
> the installation default values):
>
> listen_addresses = '*'
>
> 2) None of the following configurations of the pg_hba.conf
> file worked (the program runs on 192.168.2.120):
>
> # IPv4 local connections:
> #host    all         all         127.0.0.1/32          md5
> host    all         all            192.168.2.120/24       md5
>
> # IPv4 local connections:
> #host    all         all         127.0.0.1/32          md5
> host    all         all            192.168.2.120
> 255.255.255.255       md5
>
> # IPv4 local connections:
> host    all         all         127.0.0.1/32          md5
> host    all         all         192.168.2.120/24       md5
>
> # IPv4 local connections:
> host    all         all         127.0.0.1/32          md5
> host    all         all            192.168.2.120
> 255.255.255.255       md5
>
> I have a Symantec personal firewall installed which I turned
> off during testing.
>
> The program runs fine on localhost.
>
> Am using the Npgsql .NET library.  The Npgsql.Npgsql.Open()
> call throws an exception, the error text of which is
> "System.Net.Sockets.SocketException: NO connection could be
> made because the target machine actively refused it."

Check:
1) the listen_address='*' didn't "take". Make sure you remembered to
remove the comment sign (yup, i've seen that mistake manu times). Also,
you need to restart the service after you've changed that, perhaps you
forgot it?
2) Is there any chance that the postmaster is running on a non-default
port? Or that the client is connecting on a non-standard port?
3) Verify that the IP Npgsql connects to is correct. If you're using a
DNS name, make sure it resolves right.

If all those look right, run a "netstat -na" on the commandline and see
if there is a listener to port 5432 and what IP that one is bound to.

//Magnus

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Configure foreign host for PostgreSQL 8.0.3 on WindowsXP
@ 2005-09-29 04:46 Manikandan C <manikandanc@pervasive-postgres.com>
  2005-09-30 03:27 ` Re: Configure foreign host for PostgreSQL 8.0.3 on WindowsXP Todd Rockhold <toduro@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Manikandan C @ 2005-09-29 04:46 UTC (permalink / raw)
  To: Todd Rockhold <toduro@gmail.com>; pgsql-admin

Try disabling firewall. Because it may prevent any connections to your machine.
 
Regards,
Mani

-----Original Message-----
From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Todd Rockhold
Sent: Wednesday, September 28, 2005 1:03 PM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] Configure foreign host for PostgreSQL 8.0.3 on WindowsXP


Installed PostgreSQL 8.0.3 on WindowsXP.  Have not been able to configure so that a client program running on a different WindowsXP box can connect to the PostgreSQL database. 

As I understand the documentation, at least one of the following configurations should work, but none do.  What have I done wrong and how can I configure so that a connection can be successfully made?


1) The postgresql.conf file has (with everything else being the installation default values): 

listen_addresses = '*'

2) None of the following configurations of the pg_hba.conf file worked (the program runs on 192.168.2.120):

# IPv4 local connections:
#host    all         all         127.0.0.1/32          md5
host    all         all            192.168.2.120/24       md5

# IPv4 local connections:
#host    all         all         127.0.0.1/32          md5
host    all         all            192.168.2.120 255.255.255.255       md5

# IPv4 local connections:
host    all         all         127.0.0.1/32          md5
host    all         all         192.168.2.120/24       md5

# IPv4 local connections:
host    all         all         127.0.0.1/32          md5
host    all         all            192.168.2.120 255.255.255.255       md5

I have a Symantec personal firewall installed which I turned off during testing. 

The program runs fine on localhost.

Am using the Npgsql .NET library.  The Npgsql.Npgsql.Open() call throws an exception, the error text of which is "System.Net.Sockets.SocketException: NO connection could be made because the target machine actively refused it."

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Configure foreign host for PostgreSQL 8.0.3 on WindowsXP
  2005-09-29 04:46 Re: Configure foreign host for PostgreSQL 8.0.3 on WindowsXP Manikandan C <manikandanc@pervasive-postgres.com>
@ 2005-09-30 03:27 ` Todd Rockhold <toduro@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Todd Rockhold @ 2005-09-30 03:27 UTC (permalink / raw)
  To: pgsql-admin

Thanks to all who responded. I'm a bit strapped for time now so I won't
publish a detailed analysis of what was wrong. Several of the suggestions
provided were helpful and more than one thing was wrong with my setup. The
program is working now on the client machine.

Thanks again for the help.

^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2005-09-30 03:27 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-09-28 07:33 Configure foreign host for PostgreSQL 8.0.3 on WindowsXP Todd Rockhold <toduro@gmail.com>
2005-09-28 08:14 Re: Configure foreign host for PostgreSQL 8.0.3 on WindowsXP Magnus Hagander <mha@sollentuna.net>
2005-09-28 12:57 ` Dario <dario_d_s@unitech.com.ar>
2005-09-29 04:46 Re: Configure foreign host for PostgreSQL 8.0.3 on WindowsXP Manikandan C <manikandanc@pervasive-postgres.com>
2005-09-30 03:27 ` Todd Rockhold <toduro@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox