pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: authentication problems-- success!
2+ messages / 2 participants
[nested] [flat]
* Re: authentication problems-- success!
@ 2001-10-01 06:55 Russ McBride <Russ@psyex.com>
2001-10-01 13:23 ` Re: authentication problems-- success! Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: Russ McBride @ 2001-10-01 06:55 UTC (permalink / raw)
To: nickf@ontko.com; looseleaf@gmx.net; pgsql-admin; +Cc: tgl@sss.pgh.pa.us
Hi guys,
>When you specify the database URL in your java code, try explicitly naming
>either localhost or 127.0.0.1.
Thanks for all the time you guys spent thinking about this
authentication problem and writing me. I changed the URL in the java
code from 'localhost' to '127.0.0.1' and it worked fine (duh).
I also discovered the following interesting fact further showing that
the problem is OS-specific and has nothing to do with the way
postgreSQL is functioning. On my Mac 10.03-os machine, it makes no
difference what my network settings are, whether my ports are active,
etc. When I connect to a pg database locally, it goes fine. On my
Mac 10.1-os machine, however, when I try to make a connection to
localhost it advertises my IP to postgresql as the first of whatever
active port settings I happen to have active at that time. Only if I
switch off all ports does my IP get advertised as '127.0.0.1'.
Shouldn't specifying 'localhost' always force *my* IP to be broadcast
as 127.0.0.1 (or whatever 'localhost' may have been changed to in
/etc/hosts) regardless of what other network stuff is going on? This
problem still remains a mystery to me, but at least I know what my
new os is doing, if not why, or how to fix what it's doing.
What started off as a "quick" check to make sure that pg worked on
10.1 as well as 10.0.x versions before completing my installation
documentation turned into a full on adventure, ending with this
authentication challenge. I'm looking forward to getting some of the
actual work done now.
If anyone needs help with their Mac OS X installation send me an
e-mail. I think we've got it pretty well figured out now . . .
Best,
Russ
>
>
>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/
>
>
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 5: Have you checked our extensive FAQ?
>
>http://www.postgresql.org/users-lounge/docs/faq.html
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: authentication problems-- success!
2001-10-01 06:55 Re: authentication problems-- success! Russ McBride <Russ@psyex.com>
@ 2001-10-01 13:23 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2001-10-01 13:23 UTC (permalink / raw)
To: Russ McBride <Russ@psyex.com>; +Cc: nickf@ontko.com; looseleaf@gmx.net; pgsql-admin
Russ McBride <Russ@psyex.com> writes:
> Shouldn't specifying 'localhost' always force *my* IP to be broadcast
> as 127.0.0.1 (or whatever 'localhost' may have been changed to in
> /etc/hosts) regardless of what other network stuff is going on?
One would think. Perhaps there is something screwy about your DNS
setup; or maybe this is a plain old bug that needs to be reported to
Apple.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2001-10-01 13:23 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-10-01 06:55 Re: authentication problems-- success! Russ McBride <Russ@psyex.com>
2001-10-01 13:23 ` Re: authentication problems-- success! Tom Lane <tgl@sss.pgh.pa.us>
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