Re: [INTERFACES] Problem accessing databse via servlets - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: [INTERFACES] Problem accessing databse via servlets
Date
Msg-id 26181.938440668@sss.pgh.pa.us
Whole thread Raw
In response to Problem accessing databse via servlets  (Anders Svensson <anders@simusoft.dk>)
List pgsql-interfaces
Anders Svensson <anders@simusoft.dk> writes:
> I have 2 servlets, with basicly the same code for the database interface.
> My problem is that one works the others doesn't.
> The funny thing ?? is that the trouble program works if it is not run from
> a servlet, but from a command line????????

Strictly a guess, but: I recall a similar complaint which turned out
to be due to some kind of "virtual hosting" setup on the web server.
The net effect was that the applet appeared to be connecting from a
different IP address than the user thought it would be connecting from,
and of course that virtual IP address wasn't listed in pg_hba.conf.

If you are running a recent Postgres release (I think >= 6.5 but maybe
this is in >= 6.5.1) the postmaster log should show the IP address that
it saw the connection as coming from, so you can check this theory by
looking in the logfile.

The same message is echoed back to the client, BTW, but apparently the
jserv code thinks it should protect your innocent eyes by not showing
you the server error message :-(
        regards, tom lane


pgsql-interfaces by date:

Previous
From: "Craig Potter"
Date:
Subject: [INTERFACES] webserver interface
Next
From: "Brett W. McCoy"
Date:
Subject: Re: [INTERFACES] webserver interface