resolver does not work

basti mailinglist at unix-solution.de
Wed Apr 19 10:28:49 UTC 2023


Hello Maxim,

I have found.

nginx query ipv4 and ipv6 as expected.
systemd-resolved return servfail when there is no ipv6. I think it 
should return nodata.

When I set ipv6=off in nginx all is fine.

Best Regards,

On 19.04.23 02:51, Maxim Dounin wrote:
> Hello!
> 
> On Tue, Apr 18, 2023 at 10:25:09PM +0200, basti wrote:
> 
>> Hello Maxim,
>>
>> that does not work for me.
>>
>> root at tower:~# resolvectl query icinga2
>> icinga2: 192.168.145.217                       -- link: ve-icinga2
>>
>> -- Information acquired via protocol LLMNR/IPv4 in 105.7ms.
>> -- Data is authenticated: no
>>
>> root at tower:~# getent hosts icinga2
>> 192.168.145.217 icinga2
>>
>> root at tower:~# cat /etc/resolv.conf
>> nameserver 127.0.0.53
>> options edns0
>> root at tower:~#
>>
> 
> And what "nslookup icinga2 127.0.0.53" shows?
> 
>>      location / {
>>
>>           proxy_redirect off;
>>           proxy_set_header Host $remote_addr;
>>           proxy_set_header X-Forwarded-For  $remote_addr;
>>           proxy_set_header X-Forwarded-Host $remote_addr;
>>           proxy_set_header X-Real-IP $remote_addr;
>> #        proxy_pass https://icinga2;
>>           resolver 127.0.0.53 valid=10s;
>>           set $upstream "https://icinga2";
>>           proxy_pass $upstream;
>>
>>           # WebSocket support
>>           proxy_http_version 1.1;
>>           proxy_set_header Upgrade $http_upgrade;
>>           proxy_set_header Connection "upgrade";
>> }
>>
>> 2023/04/18 22:16:28 [error] 779163#779163: *26641 icinga2 could not be
>> resolved (3: Host not found),
> 
> As previously mentioned, the message suggests that the name is not
> available via DNS.  This is to be resolved on the systemd side.
> 
> Unfortunately, I'm not familiar with systemd-nspawn and have no
> idea how to do it properly and if it's at all possible.
> 


More information about the nginx mailing list