Re: No connection could be made because the target machine actively refused it - Mailing list pgsql-general

From Jasen Betts
Subject Re: No connection could be made because the target machine actively refused it
Date
Msg-id gt6neb$j17$1@reversiblemaps.ath.cx
Whole thread Raw
In response to No connection could be made because the target machine actively refused it  (Bill Todd <pg@dbginc.com>)
List pgsql-general
On 2009-04-22, Bill Todd <pg@dbginc.com> wrote:
> I am trying to connect to a PostgreSQL server from another machine on my
> small home network. When I click the Test button in the ODBC data mnager
> for my system DSN I get the error "No connection could be made because
> the target machine actively refused it." That may not be the exact
> message but it is close.

You mention ODBC so I'm going to assUme both PCs are running windows.

> I have no problem connecting using localhost on the machine where
> PostgresSQL is running. However, if I connect using the machine's IP
> address (10.0.0.9) either locally or from another PC I get the error
> above. I have disabled the Windows firewall and my antivirus software
> but the error persists.
>
> Any suggestions? I am new to PostgreSQL so assume I have done something
> really dumb.<g>

upto three things..

1: open port 5432/TCP in any firewalls

2: in postgresql.conf file it should not say 'listen addresses="localhost"'
   listen_addresses="*" is good unless your server doubles as a firewall/router
   in which case you probably want to list the lan interfaces (and localhost).

3: you may need to modify pg_hba.conf  too.

at work we wrap the postgresql MSI installer with our own NSIS installer and
optionally (attempt to) do those tweaks

these conf files are in the postgres "data" directory on windows
machines, there may be a link in your start menu for editing them.



pgsql-general by date:

Previous
From: Daniel Migowski
Date:
Subject: Re: PostgreSQL Hibernate Problem
Next
From: Tim Uckun
Date:
Subject: Huge sample dataset for testing.