'no pg_hba.conf entry for host "[local]", user "postgres", database "postgres"'...

Started by Kynn Jonesabout 17 years ago8 messagesgeneral
Jump to latest
#1Kynn Jones
kynnjo@gmail.com

When I try to run

% psql

as the postgres user, I get the error
psql: FATAL: no pg_hba.conf entry for host "[local]", user "postgres",
database "postgres", SSL off

I don't understand this error, since the pg_hba.conf file includes the line:

local all all ident sameuser

What could explain this behavior?

Incidentally, is there a general way to get positive confirmation that a
particular pg_hba.conf has been re-read upon bouncing the server with

kill -HUP <PID>

?

TIA!

kynn

#2Scott Marlowe
scott.marlowe@gmail.com
In reply to: Kynn Jones (#1)
Re: 'no pg_hba.conf entry for host "[local]", user "postgres", database "postgres"'...

On Mon, Apr 13, 2009 at 2:01 PM, Kynn Jones <kynnjo@gmail.com> wrote:

When I try to run
% psql
as the postgres user, I get the error
psql: FATAL:  no pg_hba.conf entry for host "[local]", user "postgres",
database "postgres", SSL off

I don't understand this error, since the pg_hba.conf file includes the line:
local all all ident sameuser
What could explain this behavior?

What do all the lines look like together?

#3Kynn Jones
kynnjo@gmail.com
In reply to: Scott Marlowe (#2)
Re: 'no pg_hba.conf entry for host "[local]", user "postgres", database "postgres"'...

On Mon, Apr 13, 2009 at 4:54 PM, Scott Marlowe <scott.marlowe@gmail.com>wrote:

On Mon, Apr 13, 2009 at 2:01 PM, Kynn Jones <kynnjo@gmail.com> wrote:

When I try to run
% psql
as the postgres user, I get the error
psql: FATAL: no pg_hba.conf entry for host "[local]", user "postgres",
database "postgres", SSL off

I don't understand this error, since the pg_hba.conf file includes the

line:

local all all ident sameuser
What could explain this behavior?

What do all the lines look like together?

The uncommented lines are:

local all yours_truly password
host all yours_truly 0.0.0.1/0 md5
host all yours_truly ::1/128 md5
local all all ident sameuser

Thanks!

Kynn

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Kynn Jones (#3)
Re: 'no pg_hba.conf entry for host "[local]", user "postgres", database "postgres"'...

Kynn Jones <kynnjo@gmail.com> writes:

On Mon, Apr 13, 2009 at 4:54 PM, Scott Marlowe <scott.marlowe@gmail.com>wrote:

On Mon, Apr 13, 2009 at 2:01 PM, Kynn Jones <kynnjo@gmail.com> wrote:

as the postgres user, I get the error
psql: FATAL: no pg_hba.conf entry for host "[local]", user "postgres",
database "postgres", SSL off

What do all the lines look like together?

The uncommented lines are:

local all yours_truly password
host all yours_truly 0.0.0.1/0 md5
host all yours_truly ::1/128 md5
local all all ident sameuser

That connection should certainly match the last line, and maybe the first
too; but it didn't find a match at all. I conclude that this file isn't
actually what's driving the postmaster --- you are looking at the wrong
file, or you changed it and forgot to SIGHUP the postmaster, or you're
connecting to some other postmaster altogether, or some other mistake
not visible in the terms of this discussion.

regards, tom lane

#5Kynn Jones
kynnjo@gmail.com
In reply to: Tom Lane (#4)
Re: 'no pg_hba.conf entry for host "[local]", user "postgres", database "postgres"'...

On Tue, Apr 14, 2009 at 12:22 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Kynn Jones <kynnjo@gmail.com> writes:

On Mon, Apr 13, 2009 at 4:54 PM, Scott Marlowe <scott.marlowe@gmail.com
wrote:

On Mon, Apr 13, 2009 at 2:01 PM, Kynn Jones <kynnjo@gmail.com> wrote:

as the postgres user, I get the error
psql: FATAL: no pg_hba.conf entry for host "[local]", user "postgres",
database "postgres", SSL off

What do all the lines look like together?

The uncommented lines are:

local all yours_truly password
host all yours_truly 0.0.0.1/0 md5
host all yours_truly ::1/128 md5
local all all ident sameuser

That connection should certainly match the last line, and maybe the first
too; but it didn't find a match at all. I conclude that this file isn't
actually what's driving the postmaster --- you are looking at the wrong
file, or you changed it and forgot to SIGHUP the postmaster, or you're
connecting to some other postmaster altogether, or some other mistake
not visible in the terms of this discussion.

Is there a general way to get positive confirmation that a particular
pg_hba.conf has been re-read upon bouncing the server with

kill -HUP <PID>

?

TIA!

Kynn

#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Kynn Jones (#5)
Re: 'no pg_hba.conf entry for host "[local]", user "postgres", database "postgres"'...

Kynn Jones <kynnjo@gmail.com> writes:

Is there a general way to get positive confirmation that a particular
pg_hba.conf has been re-read upon bouncing the server with
kill -HUP <PID>

Well, you could strace the postmaster and see what files it reads
in response to the signal.

regards, tom lane

#7Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Kynn Jones (#5)
Re: 'no pg_hba.conf entry for host "[local]", user "postgres", database "postgres"'...

Kynn Jones escribi�:

Is there a general way to get positive confirmation that a particular
pg_hba.conf has been re-read upon bouncing the server with

SHOW hba_file;

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

#8Kynn Jones
kynnjo@gmail.com
In reply to: Alvaro Herrera (#7)
Re: 'no pg_hba.conf entry for host "[local]", user "postgres", database "postgres"'...

On Tue, Apr 14, 2009 at 2:53 PM, Alvaro Herrera
<alvherre@commandprompt.com>wrote:

Kynn Jones escribió:

Is there a general way to get positive confirmation that a particular
pg_hba.conf has been re-read upon bouncing the server with

SHOW hba_file;

That's handy. Thanks!

Kynn