Re: Psql wants to use IP6 when connecting to self using tcp...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jerry Levan <jerry(dot)levan(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Psql wants to use IP6 when connecting to self using tcp...
Date: 2021-06-22 01:23:47
Message-ID: 1675051.1624325027@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jerry Levan <jerry(dot)levan(at)gmail(dot)com> writes:
> The below fails... the 'fe80....' is the ip6 address of big box.
> [jerry(at)bigbox ~]$ psql -h bigbox
> psql: error: FATAL: no pg_hba.conf entry for host "fe80::fe3f:dbff:fed1:f62e%enp7s0", user "lxxx", database "lxxx", SSL off

This is mostly a matter of how your local DNS is configured,
not PG per se. What does "nslookup bigbox" say?

> What did I have to do get the 'fatal' above case to work?

Adjust your DNS setup to return the IPv4 address first.

Or, perhaps, change PG's listen_addresses so that it's
not listening on an IPv6 address at all. There's not
going to be much point in that if you don't want
to put IPv6 entries into pg_hba.conf.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Knauss 2021-06-22 05:58:02 Re: Psql wants to use IP6 when connecting to self using tcp...
Previous Message Yu Watanabe 2021-06-22 01:08:19 Re: How to automatically delete idle client connections?