From: Tom Lane <tgl@sss.pgh.pa.us>
To: Russ McBride <Russ@psyex.com>
Cc: nickf@ontko.com
Cc: pgsql-admin@postgresql.org
Subject: Re: authentication problems
Date: Sat, 29 Sep 2001 23:55:51 -0400
Message-ID: <799.1001822151@sss.pgh.pa.us> (raw)
In-Reply-To: <v04210103b7dc469a6205@[64.170.120.144]>
References: <NEBBLAAHGLEEPCGOBHDGCEKBDLAA.nickf@ontko.com>
<v04210103b7dc258398f3@[64.170.120.108]>
<358.1001818864@sss.pgh.pa.us>
<v04210102b7dc3f72b303@[64.170.120.144]>
<530.1001820519@sss.pgh.pa.us>
<v04210103b7dc469a6205@[64.170.120.144]>
Russ McBride <Russ@psyex.com> writes:
> Typing "/usr/local/pgsql/bin/psql -h localhost testdb" starts up my
> database in psql quite nicely, which seems to indicate to me that the
> pg_hba.conf is being read and the line:
> local all trust
> is working as expected (I assume that this is the line that allows
> all local UNIX socket connections).
You assume wrong: "-h localhost" triggers a connection over IP, not
over UNIX sockets. Specifically, it's going to match the pg_hba.conf
line that mentions 127.0.0.1.
At this point I think your problem is that your JDBC setup is trying
to connect to your machine by name, not by the "localhost" alias,
and this results in a connection via your current network IP address
rather than the 127.0.0.1 loopback address. Since you have an entry
in pg_hba.conf for 127.0.0.1 and not the other address, only the
localhost address will work.
regards, tom lane
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: tgl@sss.pgh.pa.us, Russ@psyex.com, nickf@ontko.com
Subject: Re: authentication problems
In-Reply-To: <799.1001822151@sss.pgh.pa.us>
References: <NEBBLAAHGLEEPCGOBHDGCEKBDLAA.nickf@ontko.com> <v04210103b7dc258398f3@[64.170.120.108]> <358.1001818864@sss.pgh.pa.us> <v04210102b7dc3f72b303@[64.170.120.144]> <530.1001820519@sss.pgh.pa.us> <v04210103b7dc469a6205@[64.170.120.144]> <799.1001822151@sss.pgh.pa.us>
* 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