Openhabian: crazy network/DNS behavior

Hello,

several times a day I cannot connect via SSH or open BasicUI because the hostname cannot be resolved, but when I ping the device everything is OK again.

My configuration:

  • Raspberry Pi 4B (4GB)
  • Connected to a LAN port of the router (Fritz!Box), static IP config in /etc/dhcpcd.conf
  • Raspbian GNU/Linux 10 (buster) - installed with an openhabian image, latest updates are installed
  • RaspBee II on the same device (latest firmware + latest deconz software installed)
  • openHAB 3.2.0

While I have a SSH session running it happens several time a day that I cannot open another SSH session or open BasicUI, but the existing SSH session is working fine.

On another Raspberry Pi I can ping the openHAB raspi, but name resolution does not work:

pi@fipbox:~ $ arp -a
fritz.box (192.168.123.1) at dc:15:c8:71:8a:95 [ether] on eth0
pi@fipbox:~ $ ping openhab3
ping: openhab3: Name or service not known
pi@fipbox:~ $ ping openhab3.fritz.box
ping: openhab3.fritz.box: Name or service not known
pi@fipbox:~ $ ping 192.168.123.5
PING 192.168.123.5 (192.168.123.5) 56(84) bytes of data.
64 bytes from 192.168.123.5: icmp_seq=1 ttl=64 time=1.90 ms
64 bytes from 192.168.123.5: icmp_seq=2 ttl=64 time=0.580 ms
64 bytes from 192.168.123.5: icmp_seq=3 ttl=64 time=0.531 ms
64 bytes from 192.168.123.5: icmp_seq=4 ttl=64 time=0.521 ms
^C
--- 192.168.123.5 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3101ms
rtt min/avg/max/mdev = 0.521/0.883/1.901/0.588 ms
pi@fipbox:~ $ arp -a
fritz.box (192.168.123.1) at dc:15:c8:71:8a:95 [ether] on eth0
openhab3.fritz.box (192.168.123.5) at e4:5f:01:2b:85:90 [ether] on eth0
pi@fipbox:~ $ ping openhab3
ping: openhab3: Name or service not known
pi@fipbox:~ $ ping openhab3.fritz.box
ping: openhab3.fritz.box: Name or service not known
pi@fipbox:~ $

On my Windows workstation it’s similar, but when I ping the openHAB raspberry without the domain everything is working again:

C:\Users\reinh>arp -a

Schnittstelle: 192.168.123.20 --- 0x7
  Internetadresse       Physische Adresse     Typ
  192.168.123.1         dc-15-c8-71-8a-95     dynamisch
  192.168.123.5         e4-5f-01-2b-85-90     dynamisch
...

C:\Users\reinh>nslookup openhab3
Server:  fritz.box
Address:  fd00::de15:c8ff:fe71:774a

*** openhab3 wurde von fritz.box nicht gefunden: Non-existent domain.

C:\Users\reinh>nslookup openhab3.fritz.box
Server:  fritz.box
Address:  fd00::de15:c8ff:fe71:774a

*** openhab3.fritz.box wurde von fritz.box nicht gefunden: Non-existent domain.

C:\Users\reinh>ping openhab3.fritz.box
Ping-Anforderung konnte Host "openhab3.fritz.box" nicht finden. Überprüfen Sie den Namen, und versuchen Sie es erneut.

C:\Users\reinh>ping openhab3

Ping wird ausgeführt für openhab3 [192.168.123.5] mit 32 Bytes Daten:
Antwort von 192.168.123.5: Bytes=32 Zeit=3ms TTL=64
Antwort von 192.168.123.5: Bytes=32 Zeit=7ms TTL=64
Antwort von 192.168.123.5: Bytes=32 Zeit=5ms TTL=64
Antwort von 192.168.123.5: Bytes=32 Zeit=8ms TTL=64

Ping-Statistik für 192.168.123.5:
    Pakete: Gesendet = 4, Empfangen = 4, Verloren = 0
    (0% Verlust),
Ca. Zeitangaben in Millisek.:
    Minimum = 3ms, Maximum = 8ms, Mittelwert = 5ms

C:\Users\reinh>nslookup openhab3
Server:  fritz.box
Address:  fd00::de15:c8ff:fe71:774a

Name:    openhab3.fritz.box
Addresses:  2001:a61:803a:4c01:e65f:1ff:a16e:8590
          192.168.123.5

C:\Users\reinh>ping openhab3.fritz.box

Ping wird ausgeführt für openhab3.fritz.box [2001:a61:803a:4c01:e65f:1ff:a16e:8590] mit 32 Bytes Daten:
Antwort von 2001:a61:803a:4c01:e65f:1ff:a16e:8590: Zeit=4ms
Antwort von 2001:a61:803a:4c01:e65f:1ff:a16e:8590: Zeit=6ms
Antwort von 2001:a61:803a:4c01:e65f:1ff:a16e:8590: Zeit=7ms
Antwort von 2001:a61:803a:4c01:e65f:1ff:a16e:8590: Zeit=3ms

Ping-Statistik für 2001:a61:803a:4c01:e65f:1ff:a16e:8590:
    Pakete: Gesendet = 4, Empfangen = 4, Verloren = 0
    (0% Verlust),
Ca. Zeitangaben in Millisek.:
    Minimum = 3ms, Maximum = 7ms, Mittelwert = 5ms

C:\Users\reinh>

The screenshots are in German, but I think it’s understandable.

Existing SSH sessions are working fine when this problem exists, only new sessions cannot be created.

I spent a lot of time to ask aunt Google but it looks like I’m the only one who’s suffering from this strange behavior.

An idea is appreciated.

TIA
Reinhold

Personally, I don’t trust mDNS to work properly (it used to be very broken on Android), so I mostly use static IP addresses to avoid the issue. I’ve not heard of anything quite like this, though.

Hi Russ,

this was a good hint. I disabled avahi/mDNS (sudo systemctl disable --now avahi-daemon.service +.socket). No issue since this change.

Thanks a lot.
Reinhold

1 Like