From: | "Bhavana(dot)Rakesh" <Bhavana(dot)Rakesh(at)noaa(dot)gov> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Oliver Elphick <olly(at)lfix(dot)co(dot)uk>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: jdbc pg_hba.conf error |
Date: | 2007-05-31 12:57:41 |
Message-ID: | 465EC645.3010905@noaa.gov |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Ok,
I confirmed that I'm editing the right pg_hba.conf file. I made sure
that there are no other postmasters running. I made sure that there is
a user called 'brakesh'. I restart the postmaster everytime I make any
changes to pg_hba.conf file. But still same results!
[brakesh(at)lnx383 ~/db_connect]$ psql -U brakesh -h 127.0.0.1 -d testing123
psql: FATAL: no pg_hba.conf entry for host "127.0.0.1", user "brakesh",
database "testing123", SSL off
[brakesh(at)lnx383 ~/db_connect]$ psql -p 5000 testing123
Welcome to psql 7.4.17, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit
______________________________________
Here is my pg_hba.conf file again. I've commented the different records
that I've experimented with. But none of them worked. Of course, when
i commented out the first record
# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
local all all trust
I couldn't connect using the 'psql -p 5000 testing123'..which confirmed
that I'm editing the right pg_hba.conf file. My current working copy of
pg_hba.conf file follows:
____________________________________________
# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
local all all trust
# IPv4-style local connections:
#host all all 127.0.0.1 255.255.255.255 trust
#host testing123 brakesh 127.0.0.1 255.255.255.255 trust
hostnossl testing123 brakesh 127.0.0.1 255.255.255.255 trust
#hostnossl all all 127.0.0.1 255.255.255.255 trust
#hostnossl testing123 brakesh 127.0.0.1
255.255.255.255 trust
# IPv6-style local connections:
#host all all ::1/128
ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff trust
#Allow any user from any host with IP address 140.90.193.238 to
# connect to database "testing123" as the same username that ident on that
# host identifies him as (typically his Unix username):
#
#TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
#hostnossl testing123 all 140.90.193.238 255.255.255.0 ident
sameuser
Tom Lane wrote:
> Oliver Elphick <olly(at)lfix(dot)co(dot)uk> writes:
>
>> His original message (which I snipped) said he had:
>>
>
>
>> # IPv4-style local connections:
>> host all all 127.0.0.1 255.255.255.255 trust
>> host testing123 brakesh 127.0.0.1 255.255.255.255 trust
>>
>
>
>> So it seems to me he did have it configured.
>>
>
> I've seen similar problems resolved by discovering that (1) the DBA
> was editing the wrong copy of the pg_hba.conf file, or (2) there was
> actually more than one postmaster running on the machine.
>
> Check "ps" for multiple postmasters. Put a deliberate error in the
> pg_hba.conf file and verify that the postmaster fails to restart.
>
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | chris smith | 2007-05-31 13:24:59 | Re: jdbc pg_hba.conf error |
Previous Message | Filip Rembiałkowski | 2007-05-31 12:06:33 | Re: stable functions |