Posts: 4
Threads: 2
Joined: Aug 2022
Reputation:
0
08-18-2022, 06:25 PM
(This post was last modified: 08-18-2022, 06:27 PM by GlasgowGrip.)
Hello,
I have an apparent problem with DNS not resolving host names in Moode 8.1.2.
I have two Moode boxes:
1. Moode 7.6.1 running on an RPi 3B+ with a Hifiberry DAC+ Pro. It has been running great for 10 months (originally Moode 7.5) streaming internet radio and local FLAC's from an NFS share on my Synology NAS. This box resolves hostnames on the local network with no problem, as evidenced by using ping and by the NFS connection.
2. Moode 8.1.2 running on an RPi 4 4GB with a Hifiberry DAC+ Pro. This is a brand new installation of Moode 8.1.2 and it cannot resolve the host name for the NAS in the NFS path, nor for any other host on the network when I test using ping. However, if I replace the host name with the IP address of the NAS in the NFS path, then it works fine. It behaves the same whether connected through hardwired ethernet or through Wifi. So it seems like the Moode 8.1.2 box is somehow not connecting to DNS on my Router, even though it's on the same network and configured the same as the Moode 7.6.1 box.
Any ideas would be greatly appreciated! Thanks - Steve
Posts: 4
Threads: 2
Joined: Aug 2022
Reputation:
0
Update: some progress... what I didn't notice before is that when I use ping on the 7.6.1 box, it is actually appending ".local" to the host name that I enter on the command line. Based on that, I tried explicitly adding ".local" to the NFS path on the 8.1.2 box, and that does resolve correctly.
To illustrate, this NFS path works on the 7.6.1 box but not on the 8.1.2 box:
malpha//volume1/Music/FLAC
To make it work on the 8.1.2 box, I have to edit NFS path to be this:
malpha.local//volume1/Music/FLAC
Posts: 1,395
Threads: 24
Joined: Jun 2022
Reputation:
49
(08-18-2022, 07:40 PM)GlasgowGrip Wrote: Update: some progress... what I didn't notice before is that when I use ping on the 7.6.1 box, it is actually appending ".local" to the host name that I enter on the command line. Based on that, I tried explicitly adding ".local" to the NFS path on the 8.1.2 box, and that does resolve correctly.
To illustrate, this NFS path works on the 7.6.1 box but not on the 8.1.2 box:
malpha//volume1/Music/FLAC
To make it work on the 8.1.2 box, I have to edit NFS path to be this:
malpha.local//volume1/Music/FLAC
Hi,
you did it right. I believe this (the ".local" network path thing) is something bound to the 64bit linux.
You can use it also on the 7.6.1 box, if you like, for consistency sake (it works so, as you notice the appended ".local").
I am not sure, but I think @ Tim Curtis has done something about this for the auto-discovery of devices on the network, and therefore their selection from the drop-downs.
Cheers, Al.
Posts: 1,983
Threads: 45
Joined: Mar 2020
Reputation:
93
(08-18-2022, 08:31 PM)Nutul Wrote: (08-18-2022, 07:40 PM)GlasgowGrip Wrote: Update: some progress... what I didn't notice before is that when I use ping on the 7.6.1 box, it is actually appending ".local" to the host name that I enter on the command line. Based on that, I tried explicitly adding ".local" to the NFS path on the 8.1.2 box, and that does resolve correctly.
To illustrate, this NFS path works on the 7.6.1 box but not on the 8.1.2 box:
malpha//volume1/Music/FLAC
To make it work on the 8.1.2 box, I have to edit NFS path to be this:
malpha.local//volume1/Music/FLAC
Hi,
you did it right. I believe this (the ".local" network path thing) is something bound to the 64bit linux.
You can use it also on the 7.6.1 box, if you like, for consistency sake (it works so, as you notice the appended ".local").
I am not sure, but I think @Tim Curtis has done something about this for the auto-discovery of devices on the network, and therefore their selection from the drop-downs.
Cheers, Al.
There were improvements in the code for SMB protocol detection between 7 and 8 and they had the unfortunate side effect of requiring ".local"where previously it was not needed. I don't believe it is a requirement of 64bit so much, but all the 8 series players will need it.
----------------
Robert
Posts: 14,004
Threads: 318
Joined: Mar 2018
Reputation:
571
moOde code doesn't tinker with how Linux DNS works it just sets up a few conf files based on the content of the Network Config screen.
Code: # /var/www/inc/network.php
/etc/network/interfaces
/etc/dhcpcd.conf
/etc/wpa_supplicant/wpa_supplicant.conf
/etc/hostapd/hostapd.conf
# New for 8.2.0 to bridge Ethernet and WiFi (AP Router mode)
/etc/nftables.conf
Host name resolution works just fine on my network and there is no need to use the .local suffix. It's because the OS in the Router I use dynamically adds host names for LAN clients assigned a DHCP address to its DNS cache and its DNS functions as a forwarding (proxy) DNS.
I don't think all Router OS's implement dynamic DHCP updates to DNS and DNS proxy but instead rely on multicast DNS (host.local) to resolve LAN hosts and an external DNS for example 8.8.8.8 to resolve Internet hosts.
There also may have been some changes in linux client DNS caching as part of the 5.15 kernels.
Posts: 6,210
Threads: 184
Joined: Apr 2018
Reputation:
250
08-19-2022, 01:18 PM
(This post was last modified: 08-19-2022, 02:30 PM by TheOldPresbyope.
Edit Reason: ETA; 2nd ETA
)
It would seem that something changed in the Raspberry Pi OS code between Buster and Bullseye.
Here are two moOde players ---
"moode64"
Code: S Y S T E M P A R A M E T E R S
moOde release = 8.2.0 2022-MM-DD
RaspiOS = 11.3
Linux kernel = 5.15.32-v8+ #1538
Platform = Pi-4B 1.1 2GB
Architecture = aarch64 (64-bit)
System uptime = up 1 day, 20 hours, 54 minutes
Timezone = America/New_York
Current time = 2022-08-19 08:45:10
Host name = moode64
Ethernet address = 10.0.0.4
and
"m761"
Code: S Y S T E M P A R A M E T E R S
moOde release = 7.6.1 2021-12-17
RaspiOS = 10.6
Linux kernel = 5.4.77-v7+ #1371
Platform = Pi-3A+ 1.0 512MB
Architecture = armv7l (32-bit)
System uptime = up 11 hours, 47 minutes
Timezone = America/New_York
Current time = 2022-08-19 08:46:08
Host name = m761
Ethernet address = unassigned
Ethernet MAC = no adapter
WLAN address = 10.0.0.209
These players have identical hosts entries in their /etc/nsswitch.conf files. This line enumerates the "databases" to be searched and the order of search.
Code: hosts: files mdns4_minimal [NOTFOUND=return] dns wins mdns4
This means when looking up a hostname
- search first the local /etc/hosts file; if not found then go to next database
- if the hostname has the .local suffix, search the mDNS database (resolving only .local names); if not found, return from lookup (e.g., stop searching)
- search using dns; if not found go to next database
- search using wins; if not found then go to next database
- finally, try the full mdns4 service (in case it's a "non-local" mDNS hostname we're searching for. ETA - I'm not sure what this means.).
Let's see what happens when we ask each player to look up the other player's hostname
Code: pi@m761:~ $ getent hosts moode64
10.0.0.4 moode64
pi@m761:~ $
Code: pi@moode64:~ $ getent hosts m761
pi@moode64:~ $
Huh. Something changed between Buster and Bullseye. Sorry, I don't know what. I use mDNS exclusively on my LAN (no local DNS resolver on my ISP-provided router) and always append .local to hostnames. Someday I'll set up a local DNS service, when I've run out of other things to do!)
Regards,
Kent
ETA - oops, I mean to use a vanilla moOde 8.1.2 player in this example but I see I picked my one player with more recent git repo contents "gulped" in: it reported as release 8.2.0. The result is the same with my 8.1.2 players.
Posts: 4
Threads: 2
Joined: Aug 2022
Reputation:
0
08-19-2022, 01:41 PM
(This post was last modified: 08-19-2022, 01:42 PM by GlasgowGrip.)
(08-19-2022, 07:26 AM)the_bertrum Wrote: There were improvements in the code for SMB protocol detection between 7 and 8 and they had the unfortunate side effect of requiring ".local"where previously it was not needed. I don't believe it is a requirement of 64bit so much, but all the 8 series players will need it.
(08-19-2022, 01:18 PM)TheOldPresbyope Wrote: Huh. Something changed between Buster and Bullseye. Sorry, I don't know what. I use mDNS exclusively on my LAN (no local DNS resolver on my ISP-provided router) and always append .local to hostnames. Someday I'll set up a local DNS service, when I've run out of other things to do!)
Thank you @ the_bertrum, that seems to make sense. And thank you Kent @ TheOldPresbyope for confirmation that you are seeing the same behavior.
So based on that and what @ Tim Curtis added, my takeaway is that all 8-series players will need to add the .local suffix explicitly unless they are on a home network with a router that provides the dynamic DNS caching that Tim mentioned. I am running a Netgear Nighthawk R6700v2 router with latest firmware updates, but apparently it does not provide that function (or is misconfigured?).
Anyway, good enough, I will add the .local suffix explicitly in my NFS share path in moOde and be done with it. Easy enough since I don't want to rely on using a fixed IP address. And just thinking out loud - possibly this should be mentioned in the setup guide going forward for moOde 8.x?
Thanks again to you all for weighing in - what a great community!
Cheers, Steve
Posts: 14,004
Threads: 318
Joined: Mar 2018
Reputation:
571
(08-19-2022, 01:18 PM)TheOldPresbyope Wrote: It would seem that something changed in the Raspberry Pi OS code between Buster and Bullseye.
Here are two moOde players ---
"moode64"
Code: S Y S T E M P A R A M E T E R S
moOde release = 8.2.0 2022-MM-DD
RaspiOS = 11.3
Linux kernel = 5.15.32-v8+ #1538
Platform = Pi-4B 1.1 2GB
Architecture = aarch64 (64-bit)
System uptime = up 1 day, 20 hours, 54 minutes
Timezone = America/New_York
Current time = 2022-08-19 08:45:10
Host name = moode64
Ethernet address = 10.0.0.4
and
"m761"
Code: S Y S T E M P A R A M E T E R S
moOde release = 7.6.1 2021-12-17
RaspiOS = 10.6
Linux kernel = 5.4.77-v7+ #1371
Platform = Pi-3A+ 1.0 512MB
Architecture = armv7l (32-bit)
System uptime = up 11 hours, 47 minutes
Timezone = America/New_York
Current time = 2022-08-19 08:46:08
Host name = m761
Ethernet address = unassigned
Ethernet MAC = no adapter
WLAN address = 10.0.0.209
These players have identical hosts entries in their /etc/nsswitch.conf files. This line enumerates the "databases" to be searched and the order of search.
Code: hosts: files mdns4_minimal [NOTFOUND=return] dns wins mdns4
This means when looking up a hostname
- search first the local /etc/hosts file; if not found then go to next database
- if the hostname has the .local suffix, search the mDNS database (resolving only .local names); if not found, return from lookup (e.g., stop searching)
- search using dns; if not found go to next database
- search using wins; if not found then go to next database
- finally, try the full mdns4 service (in case it's a non-.local mDNS hostname we're searching for).
Let's see what happens when we ask each player to look up the other player's hostname
Code: pi@m761:~ $ getent hosts moode64
10.0.0.4 moode64
pi@m761:~ $
Code: pi@moode64:~ $ getent hosts m761
pi@moode64:~ $
Huh. Something changed between Buster and Bullseye. Sorry, I don't know what. I use mDNS exclusively on my LAN (no local DNS resolver on my ISP-provided router) and always append .local to hostnames. Someday I'll set up a local DNS service, when I've run out of other things to do!)
Regards,
Kent
ETA - oops, I mean to use a vanilla moOde 8.1.2 player in this example but I see I picked my one player with more recent git repo contents "gulped" in: it reported as release 8.2.0. The result is the same with my 8.1.2 players.
Interesting.
I forgot about nsswitch. I'll look into it.
Posts: 6,210
Threads: 184
Joined: Apr 2018
Reputation:
250
In the bad ol' days---or good ol' days, depending on your point of view---we regularly had to exchange hosts files containing the hostnames and their IP addresses of all the Unix workstations on our organization's network.
Then Sun Microsystems won the day with NIS aka Sun Yellow Pages. The nsswitch function glued it together with DNS and later mDNS. In some ways things got better "bigly"; in other ways not so much
Regards,
Kent
Posts: 1,395
Threads: 24
Joined: Jun 2022
Reputation:
49
(08-19-2022, 03:03 PM)TheOldPresbyope Wrote: In the bad ol' days---or good ol' days, depending on your point of view---we regularly had to exchange hosts files containing the hostnames and their IP addresses of all the Unix workstations on our organization's network.
Then Sun Microsystems won the day with NIS aka Sun Yellow Pages. The nsswitch function glued it together with DNS and later mDNS. In some ways things got better "bigly"; in other ways not so much 
Regards,
Kent
Kent...
thank you so much for remembering me that I am old school. And not only school, in the sentence. I was almost there (you probably a handful of years before me). Fun indeed (ok, not all bells and whistles, but fun, anyway).
Cheers, Al.
|