Re: authentication problems

From: "Nick Fankhauser" <nickf(at)ontko(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Russ McBride" <Russ(at)psyex(dot)com>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: authentication problems
Date: 2001-09-30 20:14:57
Message-ID: NEBBLAAHGLEEPCGOBHDGAEKHDLAA.nickf@ontko.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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(at)doxpop(dot)com Phone 1.765.965.7363 Fax 1.765.962.9788
doxpop - Court records at your fingertips - http://www.doxpop.com/

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Russ McBride 2001-10-01 06:55:37 Re: authentication problems-- success!
Previous Message Dave Johnson 2001-09-30 19:07:30 reteptools.jar