From: Nick Fankhauser <nickf@ontko.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Russ McBride <Russ@psyex.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: authentication problems
Date: Sun, 30 Sep 2001 15:14:57 -0500
Message-ID: <NEBBLAAHGLEEPCGOBHDGAEKHDLAA.nickf@ontko.com> (raw)
In-Reply-To: <799.1001822151@sss.pgh.pa.us>
Russ-
> > Typing "/usr/local/pgsql/bin/psql -h localhost testdb" starts up my
> > database in psql quite nicely
Here's a suggestion which certainly doesn't run down the cause
satisfactorily, but might meet your goals and add a clue...
When you specify the database URL in your java code, try explicitly naming
either localhost or 127.0.0.1.
Supposedly, JDBC always defaults to localhost if a host is not specified,
but from what we've learned so far, psql seems to have no problem if you
explicitly point it to localhost using an IP connection, whereas JDBC
doesn't connect when left to take the implicit default.
So try either "jdbc:postgresql://localhost/testdb" or
"jdbc:postgresql://127.0.0.1/testdb" & see what happens.
If either works, you have at least achieved your goal of a stable local JDBC
connection that doesn't depend on the actual IP address of the local
machine. You'll also have one more clue to ponder if you can't sleep nights
without knowing *why* the default isn't working as expected.
You mentioned at the start of this thread that it works fine for you an a
different machine- is the working machine also running Mac OS 10.1?
-Nick
---------------------------------------------------------------------
Nick Fankhauser
nickf@doxpop.com Phone 1.765.965.7363 Fax 1.765.962.9788
doxpop - Court records at your fingertips - http://www.doxpop.com/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: nickf@ontko.com, tgl@sss.pgh.pa.us, Russ@psyex.com
Subject: Re: authentication problems
In-Reply-To: <NEBBLAAHGLEEPCGOBHDGAEKHDLAA.nickf@ontko.com>
References: <799.1001822151@sss.pgh.pa.us> <NEBBLAAHGLEEPCGOBHDGAEKHDLAA.nickf@ontko.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox