From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mike Martin <redtux1@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Problem with connecting with named host parameter
Date: Fri, 27 Aug 2021 10:00:52 -0400
Message-ID: <748472.1630072852@sss.pgh.pa.us> (raw)
In-Reply-To: <CAOwYNKZ=-DnT9w9Vk4cc6a1FTrvszhN1gGT_RqmKArerOfT4Mg@mail.gmail.com>
References: <CAOwYNKZ=-DnT9w9Vk4cc6a1FTrvszhN1gGT_RqmKArerOfT4Mg@mail.gmail.com>
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
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-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, redtux1@gmail.com
Subject: Re: Problem with connecting with named host parameter
In-Reply-To: <748472.1630072852@sss.pgh.pa.us>
References: <CAOwYNKZ=-DnT9w9Vk4cc6a1FTrvszhN1gGT_RqmKArerOfT4Mg@mail.gmail.com> <748472.1630072852@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