Re: jdbc pg_hba.conf error

Поиск
Список
Период
Сортировка
От Ray Stell
Тема Re: jdbc pg_hba.conf error
Дата
Msg-id 20070531132700.GB12941@cns.vt.edu
обсуждение исходный текст
Ответ на Re: jdbc pg_hba.conf error  ("Bhavana.Rakesh" <Bhavana.Rakesh@noaa.gov>)
Список pgsql-general
What is listen_addresses set to in postgresql.conf?
'*' corresponds to all available IP interfaces.  Maybe
you are not listening on localhost.



On Thu, May 31, 2007 at 08:57:41AM -0400, Bhavana.Rakesh wrote:
> 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@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@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@lfix.co.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
> >

--
  Lost time is when we learn nothing from the experiences of life. Time
 gained is when we grow to have a wisdom that is tested in the reality of life.

В списке pgsql-general по дате отправления:

Предыдущее
От: "chris smith"
Дата:
Сообщение: Re: jdbc pg_hba.conf error
Следующее
От: "Bhavana.Rakesh"
Дата:
Сообщение: Re: jdbc pg_hba.conf error