Skip site navigation (1) Skip section navigation (2)

Re: [GENERAL] No DB connection in Netscape ? Please help.

From: Amos Hayes <ahayes(at)ingenia(dot)com>
To: "Kapoor, Nishikant X" <Nishikant(dot)X(dot)Kapoor(at)nspco(dot)com>
Cc: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [GENERAL] No DB connection in Netscape ? Please help.
Date: 1998-08-14 19:04:46
Message-ID: Pine.LNX.3.96.980814145347.8342D-100000@smurf.ingenia.com (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-interfaces
On Fri, 14 Aug 1998, Kapoor, Nishikant X wrote:

> Typing "mm01: netscape http://genx/PrfApplet.htm" brings up the applet
> in the NS
> but the database connection is not established. The Java console shows:
> 
> openDb(PrfDb):Connecting to Database URL = jdbc:postgresql:prfdb...
> openDb(PrfDb): Could not connect. e= security.Couldn't connect to
> 'localhost' with origin from 'genx'.


> The same problems exits when I start NS from the same machine where the
> PostgreSQL
> server is running i.e. the Linux box(genx).
> 
> *** But, when I use "genx: netscape http://127.0.0.1/PrfApplet.htm" on
> genx, the
> *** database connection gets established.


I'm guessing that you have to configure postgress to allow connections
from other hosts. In the fist case, you are comming from another machine
and it won't let you in. In the second case, you are comming from the same
machine but using the machine's hostname. In this case, your IP stack is
telling itself that the connection is comming from your IP address not
your localhost address, so it won't let that in either. The third try
works because postgres is told that the connection is comming from
127.0.0.1 which it is (by default I assume) configured to accept.

This is behaviour that I've seen for all sorts of other access control
situations, so I'm guessing it's the problem here. If I'm not mistaken,
you want to have a look at the pg_access man page and the pg_hba.conf
file.


--
Amos Hayes					  Systems Architect
ahayes(at)ingenia(dot)com			Ingenia Group - Software Kinetics Ltd.
http://smurf.ingenia.com/~ahayes		http://www.ingenia.com

"Remember: No one can make you feel inferior without your consent."
   - ELEANOR ROOSEVELT



In response to

pgsql-interfaces by date

Next:From: Kapoor, Nishikant XDate: 1998-08-14 20:17:18
Subject: RE: [GENERAL] No DB connection in Netscape ? Please help.
Previous:From: Linda ChowDate: 1998-08-14 18:44:36
Subject: join mailing lists

pgsql-general by date

Next:From: Kapoor, Nishikant XDate: 1998-08-14 20:17:18
Subject: RE: [GENERAL] No DB connection in Netscape ? Please help.
Previous:From: JohnDzDate: 1998-08-14 17:17:29
Subject: interfaces mailing

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group