resolver does not work

Maxim Dounin mdounin at mdounin.ru
Wed Apr 19 00:51:28 UTC 2023


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.

-- 
Maxim Dounin
http://mdounin.ru/


More information about the nginx mailing list