Re: Problem with host connection

From: Jeremy Smith <Jeremy(at)justasofty(dot)com>
To: "John Clark L(dot) Naldoza" <njclark(at)ntsp(dot)nec(dot)co(dot)jp>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Problem with host connection
Date: 2001-02-26 12:35:08
Message-ID: B6BFFDFB.1047%Jeremy@justasofty.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi, Thanks for your response.

netstat did not find postgres ?????????
I do not have a postmaster.opts
I am running version 6.5 on a Mac using Yellowdog Linux 1.2

Jeremy

> From: "John Clark L. Naldoza" <njclark(at)ntsp(dot)nec(dot)co(dot)jp>
> Organization: NEC Telecom Software
> Date: Mon, 26 Feb 2001 16:57:06 +0800
> To: Jeremy Smith <Jeremy(at)justasofty(dot)com>
> Cc: pgsql-general(at)postgresql(dot)org
> Subject: Re: [GENERAL] Problem with host connection
>
> Hello Jeremy...
>
> Jeremy Smith wrote:
>>
>> This is a new area to me, I am rewriting a Microsoft Access
>> application for the company
>
> Have you tried using PgAdmin? It may help you a bit... Then just iron
> out the details afterwards...;-) It's somewhere in
> www.greatbridge.com... I think..;-)
>
>> I work for in Java and Postgres.
>
> JDBC...
>
>>
>> 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'?
>
> try a
>
> netstat -a | grep postgres
>
>
>>
>> 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
>
> This is how it is started in my machine...;-(
>
> su -l postgres -c "/usr/bin/pg_ctl -D $PGDATA -p /usr/bin/postmaster
> start >/dev/null 2>&1"
>
>
> The -i option is with /var/lib/pgsql/data/postmaster.opts in my
> machine...
>
>>
>> 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
>
> As for PGDATA, it's in the script...
>
> if [ -f /var/lib/pgsql/PG_VERSION ] && [ -d
> /var/lib/pgsql/base/template1 ]
> then
> export PGDATA=/var/lib/pgsql
> else
> export PGDATA=/var/lib/pgsql/data
> fi
>
> What version of PostgreSQL are you running? What O.S. are you running
> it in? And how did you install postgresql?
>
>
> Cheers,
>
>
> John Clark
>
> --
> /) John Clark Naldoza y Lopez (¥
> / ) Software Design Engineer II ( ¥
> _( (_ _ Web-Application Development _) )_
> (((¥ ¥> /_> Cable Modem Network Management System <_¥ </ /)))
> (¥¥¥¥ ¥_/ / NEC Telecom Software Phils., Inc. ¥ ¥_/ ////)
> ¥ / ¥ /
> ¥ _/ phone: (+63 32) 233-9142 loc. 3112 ¥_ /
> / / cellphone: (+63 919) xxx-xxxx ¥ ¥
> / / email: njclark(at)ntsp(dot)nec(dot)co(dot)jp ¥ ¥
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2001-02-26 14:02:21 Re: Problem with host connection
Previous Message Christopher Sawtell 2001-02-26 11:33:32 A couple of funny things happening?