No connection could be made because the target machine actively refused it...

From: Frank Moore <francis(dot)moore(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: No connection could be made because the target machine actively refused it...
Date: 2013-05-30 20:40:18
Message-ID: CAP=uVxTU6SosY0Tg2Lw7b3Fvk8e4wPwgobNMoqnqp6=K_qFNkQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,

I've installed PostgreSQL 9.2 (client and server) on a local Windows
desktop and can run pgAdmin to see the postgres database.
However, now I'm trying to install a sample database to have a play with
some queries etc...
I'm using psql, connecting to postgres on localhost as the postgres user
and running the following command:

postgres# CREATE DATABASE dvdrental;
postgres# pg_restore --dbname=dvdrental --verbose dvdrental.tar

Nothing happens, and in the postgres log I get the following error:

2013-05-30 20:57:07 BST LOG: incomplete startup packet
2013-05-30 20:57:45 BST LOG: could not receive data from client: No
connection could be made because the target machine actively refused it.

I've googled this error and it seems that it is probably something to do
with my pg_hba.conf file.
I have tried each of the following entries and reloaded the file each time
(pg_ctl reload), but to no avail:

# IPv4 local connections:
host all all 255.255.255.255/0 trust
host all all 127.0.0.1/32 trust
host all all 0.0.0.0/0 trust
local all all trust

I also have 'listen_addresses = '*'' in my postgresql.conf file.

Can somebody please put me out of my misery and tell me what the entry
should be when trying to access the server from a client on the same host?

Many thanks.

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Jalisson Mello 2013-05-30 23:43:54 Re: Copy to Csv file extremely slow
Previous Message Merlin Moncure 2013-05-30 19:54:51 Re: Copy to Csv file extremely slow