You are not logged in.

#1 2020-10-08 07:34:05

weltio
Member
From: Germany
Registered: 2009-04-05
Posts: 74

cannot resolve hostname of one host in LAN

I cannot resolve the hostname (say: MACHINE1) of one of my machines in lan.

After connecting via ssh (over ip address) and restarting avahi-daemon.service it works again.

Why is that? (I have not tested whether it is enough to connect via ssh without restarting avahi)

That doesnt seem to be intended.

The resolution problem exists on all other machines in the network and only if they want to resolve MACHINE1.

Offline

#2 2020-10-08 08:04:36

seth
Member
Registered: 2012-09-03
Posts: 16,575

Offline

#3 2020-10-13 08:44:38

weltio
Member
From: Germany
Registered: 2009-04-05
Posts: 74

Re: cannot resolve hostname of one host in LAN

weltio wrote:

(I have not tested whether it is enough to connect via ssh without restarting avahi)

Now I tested and it is not enough. Avahi restart is mandatory

seth wrote:

Can you resolve MACHINE1.local ?

no

seth wrote:

Mhm, that probably means that systemd-resolvd would work out of the box? It seems that it didnt which was the reason for installing avahi...
I removed avahi and started and enabled systemd-resolvd.
For now, it works - as it would have with an avahi restart.
I will test further.
Thanks for the hint!

I dont think that this is an issue (some time ago it had been working for several years without any problems )

Offline

#4 2020-10-20 08:21:15

weltio
Member
From: Germany
Registered: 2009-04-05
Posts: 74

Re: cannot resolve hostname of one host in LAN

weltio wrote:

Mhm, that probably means that systemd-resolvd would work out of the box? It seems that it didnt which was the reason for installing avahi...
I removed avahi and started and enabled systemd-resolvd.
For now, it works - as it would have with an avahi restart.
I will test further.
Thanks for the hint!

It doesn't work... (just came back from suspend and could not resolve the hostname)
Systemd-resolvd is running

dig MACHINE1 +short
dig MACHINE1.local +short
;; Warning: Client COOKIE mismatch

Any idea on that?

after restarting systemd-resolvd I can resolve again:

dig MACHINE1.local +short
;; Warning: Client COOKIE mismatch
dig MACHINE1 +short      
192.168.178.50

Last edited by weltio (2020-10-20 08:26:14)

Offline

#5 2020-10-20 11:22:05

seth
Member
Registered: 2012-09-03
Posts: 16,575

Re: cannot resolve hostname of one host in LAN

https://wiki.archlinux.org/index.php/Sy … cal_domain
What does "resolvectl status" say in either situation?

Offline

#6 2020-10-23 09:28:06

weltio
Member
From: Germany
Registered: 2009-04-05
Posts: 74

Re: cannot resolve hostname of one host in LAN

seth wrote:

https://wiki.archlinux.org/index.php/Sy … cal_domain
What does "resolvectl status" say in either situation?

In both cases:

resolvectl status
Failed to get global data: Unit dbus-org.freedesktop.resolve1.service not found.

I added:

cat /etc/NetworkManager/conf.d/no-systemd-resolved.conf
[main]
systemd-resolved=false

and restartet NetworkManager but it didnt have an effect

It seems odd that I can resolve other hostnames without problems - e.g. MACHINE2 (which is running NetworkManager too - in contrast to MACHINE1)

Last edited by weltio (2020-10-23 09:34:06)

Offline

#7 2020-10-23 14:11:11

seth
Member
Registered: 2012-09-03
Posts: 16,575

Re: cannot resolve hostname of one host in LAN

Failed to get global data: Unit dbus-org.freedesktop.resolve1.service not found.

But resolved was supposed to be used here (and perhaps did work before a suspend)?

dbus-send --print-reply --dest=org.freedesktop.DBus  /org/freedesktop/DBus org.freedesktop.DBus.ListNames
echo $DBUS_SESSION_BUS_ADDRESS
loginctl session-status

Is the S3 trigger reproducible/reliable?

Offline

#8 Yesterday 08:37:53

weltio
Member
From: Germany
Registered: 2009-04-05
Posts: 74

Re: cannot resolve hostname of one host in LAN

seth wrote:

Failed to get global data: Unit dbus-org.freedesktop.resolve1.service not found.

But resolved was supposed to be used here (and perhaps did work before a suspend)?


dbus-send --print-reply --dest=org.freedesktop.DBus  /org/freedesktop/DBus org.freedesktop.DBus.ListNames
echo $DBUS_SESSION_BUS_ADDRESS
loginctl session-status

You mean on my host, MACHINE1 (not resolvable) or MACHINE2 (resolvable)?

seth wrote:

Is the S3 trigger reproducible/reliable?

Indeed I use S3 but the problem probably occurs right after boot too. However I will test that soon again.

Last edited by weltio (Yesterday 08:38:19)

Offline

#9 Yesterday 08:41:11

seth
Member
Registered: 2012-09-03
Posts: 16,575

Re: cannot resolve hostname of one host in LAN

The host (where you hopefully tested resolvectl status)
If resolved is supposed to be used but cannot be contacted, that can explain why the resolution fails (or be just another symptom, but if restarting resolved "fixes" it, it's rather the cause)

Offline

#10 Yesterday 09:18:35

weltio
Member
From: Germany
Registered: 2009-04-05
Posts: 74

Re: cannot resolve hostname of one host in LAN

seth wrote:

The host (where you hopefully tested resolvectl status)
If resolved is supposed to be used but cannot be contacted, that can explain why the resolution fails (or be just another symptom, but if restarting resolved "fixes" it, it's rather the cause)

Well, if "the host" means MACHINE1 (the not resolvable machine)
then the output of resolvectl is different:

resolvectl status
Global
       LLMNR setting: yes                 
MulticastDNS setting: yes                 
  DNSOverTLS setting: no                  
      DNSSEC setting: no                  
    DNSSEC supported: no                  
  Current DNS Server: 192.168.1.1       
         DNS Servers: 192.168.1.1       
Fallback DNS Servers: 1.1.1.1             
                      9.9.9.10            
                      8.8.8.8             
                      2606:4700:4700::1111
                      2620:fe::10         
                      2001:4860:4860::8888
          DNS Domain: peter.box           

Link 2 (eno1)
      Current Scopes: LLMNR/IPv4 LLMNR/IPv6
DefaultRoute setting: no                   
       LLMNR setting: yes                  
MulticastDNS setting: no                   
  DNSOverTLS setting: no                   
      DNSSEC setting: no                   
    DNSSEC supported: no

MACHINE2's output is as described. But MACHINE2 is resolvable...

I actually thought the resolving part would be the router which is responsible for dns...

dig MACHINE1 @peter.box +short
192.168.1.100
# works only after restart of resolved on MACHINE1

Offline

#11 Yesterday 09:37:32

seth
Member
Registered: 2012-09-03
Posts: 16,575

Re: cannot resolve hostname of one host in LAN

No, meant the system where you fail to resolve MACHINE1 from.
The resolution starts on the local system and invokes several mechanisms, dns bein one f them but not for avahi name resolution.

Offline

Board footer

Powered by FluxBB