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: "Peter J(dot) Holzer" <hjp-pgsql(at)hjp(dot)at>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Psql wants to use IP6 when connecting to self using tcp...
Date: 2021-06-24 00:33:33
Message-ID: 2558211.1624494813@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:
> bigbox has a freshly installed Fedora 34 system and it runs postgresql 13.3

> the following are being run ON bigbox

> nslookup bigbox returns the correct ipv4 address
> nslookup bigbox.skynet returns the correct ipv4 address

> psql -h bigbox.skynet allows me to connect to the database
> psql -h bigbox fails because the ipv6 address is returned and there is no hba entry..

It's quite odd that nslookup isn't agreeing with glibc's name
resolution code. I suspect that the problem lies with systemd, which
has relentlessly continued its campaign to break everything in sight,
and has lately gotten its fingers into name resolution as well:

https://fedoraproject.org/wiki/Changes/systemd-resolved

Perhaps something on that page will help you figure out what's up.
My guess based on what you've said here is that nslookup and glibc
are not using the same DNS search path. Traditionally that would be
set by a "search" line in /etc/resolv.conf, but ghod knows how it's
determined under systemd-resolved.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Rowley 2021-06-24 00:43:39 Re: Partitioned Table Index Column Order
Previous Message Tom Lane 2021-06-23 23:56:54 Re: Partitioned Table Index Column Order