DNS entries changing Raspberry Pi 4 and FRITZ!Box v7590

Hello,

lately I discovered a some strange behavior with the DNS of my openHAB installation.
After some time of running the system is not reachable using the hostname, but it works using the IP address. After rebooting the Raspberry Pi everything is fine for a while.

Router:
FRITZ!Box 7590
Firmware = 07.20

System:
Release = Raspbian GNU/Linux 10 (buster)
Kernel = Linux 5.4.51-v7l+
Platform = Raspberry Pi 4 Model B Rev 1.1
Memory = Free: 2.75GB (73%), Used: 1.03GB (27%), Total: 3.78GB
Root = Free: 23.48GB (85%), Used: 4.01GB (15%), Total: 28.99GB
Updates = 0 apt updates available.

openHAB:
openHAB 2.5.7-1 (Release Build)

Java:
OpenJDK Runtime Environment (Zulu 8.48.1.243-CA-linux_aarch32hf) (build 1.8.0_262-b17)
OpenJDK Client VM (Zulu 8.48.1.243-CA-linux_aarch32hf) (build 25.262-b17, mixed mode)

After rebooting the Raspberry Pi I get the following information looking up the IP address:
> nslookup 192.168.1.10

Server:		192.168.1.1
Address:		192.168.1.1#53

10.1.168.192.in-addr.arpa		name = MYRASPPI.fritz.box.
10.1.168.192.in-addr.arpa		name = MYRASPPI-fritz-box.fritz.box.

Actually I have no idea where the entry MYRASPPI-fritz-box comes from. I can not find it anywhere and I am quite sure, that I did not enter it anywhere like that.

Looking up the IP address later will result in:
> nslookup 192.168.1.10

Server:		192.168.1.1
Address:		192.168.1.1#53

10.1.168.192.in-addr.arpa		name = MYRASPPI.fritz.box.
10.1.168.192.in-addr.arpa		name = MYRASPPI-fritz-box.fritz.box.
10.1.168.192.in-addr.arpa		name = JmDNS-/192-168-1-10.fritz.box.

Everything is still working in this state.

If I look up the IP address, when the system is not reachable by hostname anymore it will result:
> nslookup 192.168.1.10

Server:		192.168.1.1
Address:		192.168.1.1#53

10.1.168.192.in-addr.arpa		name = MYRASPPI-fritz-box.fritz.box.

I understand, why I am not able to reach the system by hostname now, but why do the entries change during runtime?

During setup of the openHAB I set the Hostname to MYRASPPI.

In the FRITZ!Box router I bind the Raspberry Pi (by MAC address I think) to the name MYRASPPI and the IP address 192.168.1.10.

Rebooting the Raspberry Pi makes everything working again for a couple of hours.

I discovered the problem a few weeks ago.
It might be related to an update of the system, but I can’t say for sure, since I usually update every time , I am applying changes to the system.
It is not related to the latest Firmwareupdate of the FRITZ!Box, since I discovered the problem already with the 07.12 Firmware.
I do not discover anything similar withe any other of my network devices.

Does anyone discover something similar?
Does anyone has an idea how to find and solve the problem?

seems to be related to this: https://github.com/openhab/openhab-core/issues/1472

Hello @Wolfgang_S,

that looks like it and explains some of the behavior.
Actually I still do not understand why this overrides the configuration in my FRITZ!Box router.

1 Like

Same problem same router:

I added wins to hosts entry in the file /etc/nsswitch.conf of the pi and now the fritz box shows the hostname openhab instead of JmDns-/aso (I did not change the hostname in the fritz box UI, so it is sure the pi told it to the fritz box) Maybe the fritz box needs wins in additional to dns. Now it takes some days (mostly) to check if it keeps the hostname of the pi or if it loose it again.

Edit: Does not work :frowning:

br,

Tom