Problem with host connection

From: Jeremy Smith <Jeremy(at)justasofty(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Problem with host connection
Date: 2001-02-26 08:15:03
Message-ID: B6BFC106.1038%Jeremy@justasofty.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

This is a new area to me, I am rewriting a Microsoft Access application for
the company
I work for in Java and Postgres.

I have created a testdatabase called history which I can access with <psql
history> fine
as well as from a Perl test app I have written.
But if I try to specify a host in either my Java test app or psql I get the
same
error message

Connection to database 'history' failed.
connectDB() -- connect() failed: Connection refused
Is the postmaster running (with -i) at '127.0.0.1' and accepting connections
on TCP/IP port '5432'?

I also have the same errors when runing under the postgres account.

<psql history> works fine

<psql -p 5432 history) also works fine

<psql -h 127.0.0.1 -p 5432 history> give the following error message
Connection to database 'history' failed.
connectDB() -- connect() failed: Connection refused
Is the postmaster running (with -i) at '127.0.0.1' and accepting connections
on TCP/IP port '5432'?

<psql -h 192.168.1.168 -p 5432 history> gives the same error

THE NETWORK SEEMS OK:
PING 127.0.0.1 (127.0.0.1) from 127.0.0.1 : 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=0.2 ms

PING 192.168.1.168 (192.168.1.168) from 192.168.1.168 : 56(84) bytes of
data.
64 bytes from 192.168.1.168: icmp_seq=0 ttl=255 time=0.2 ms

THE FILE /etc/rc.d/init.d/postgresql contains the following line
su -l postgres -c '/usr/bin/postmaster -i -S -D /var/lib/pgsql/data'
# originaly the -D variable was /var/lib/pgsql but I changed it to the same
as the PGDATA
# setting
# neither seems to make any difference - jeremy

THE FILE /var/lib/pgsql/data/pg_hba.conf contains the following lines at the
end:
local all trust
host all 127.0.0.1 255.255.255.255 trust

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Renaud Tthonnart 2001-02-26 08:15:42 Re: Updating an array
Previous Message Renaud Tthonnart 2001-02-26 08:14:08 Re: How to create a dynamic list?