Re: Problem with connecting with named host parameter

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Problem with connecting with named host parameter
Дата
Msg-id 748472.1630072852@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Problem with connecting with named host parameter  (Mike Martin <redtux1@gmail.com>)
Ответы Re: Problem with connecting with named host parameter  (Mike Martin <redtux1@gmail.com>)
Список pgsql-general
Mike Martin <redtux1@gmail.com> writes:
> I am getting the following error when I connect with hostname on localhost

> psql -h capture -U <dbuser> -p 5432 <dbname>
> psql: error: FATAL:  no pg_hba.conf entry for host
> "fe80::7285:c2ff:feb0:cd4%eth0", user "usevideo", database "usevideos", SSL
> off

Evidently, your DNS setup is resolving the machine's name as a IPv6
address, whereupon PG quite legitimately doesn't find a match in
its pg_hba table.  (I suppose you are using listen_addresses = "*",
else the server wouldn't even be listening on this address.)

> This is with pg 11 and 12 on fedora 34

Looking at the "hosts" entry in /etc/nsswitch.conf might help figure out
exactly what's going on, but I'll bet a nickel that this is some
unhelpful systemd behavior.

            regards, tom lane



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

Предыдущее
От: Mike Martin
Дата:
Сообщение: Problem with connecting with named host parameter
Следующее
От: Saul Perdomo
Дата:
Сообщение: Re: Manual failover cluster