![]() |
moOde sometimes shows up LAN as <hostname>-2.local - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7) +--- Thread: moOde sometimes shows up LAN as <hostname>-2.local (/showthread.php?tid=7377) |
moOde sometimes shows up LAN as <hostname>-2.local - TheOldPresbyope - 02-02-2025 I'm sure I'm in a small minority with my LAN setup. My ISP-provided cable modem/router/AP does not resolve DNS requests for local hosts so on the LAN I use multicast DNS (e.g., the pseudo-domain .local) exclusively. Normally, this causes only one headache with moOde. When I use the webUI to scan the LAN for NAS shares, I have to remember to hand-edit .local into the results so that the subsequent mount command will succeed. Otherwise it fails, indicating the host was not found. [1] However, from time to time I get a curious result when I reboot a moOde host (happens a lot in testing). The host starts getting advertised in the pseudo-domain with a suffix, typically, "-2", appended. Example, host "moode" becomes host "moode-2". This is annoying [2] because anything already configured to deal with, say, moode.local then has to be changed to moode-2.local. After some digging around the InterWeb I found a useful post which suggested this problem can occur in Linux if avahi (the daemon which does the advertising) is configured to use both IPv4 and IPv6. [3] The post in question suggests it's a bug. What has worked for me is to edit /etc/avahi/avahi-daemon.conf, changing the line "use-ipv6=yes" to "use-ipv6=no". After rebooting, I reliably get the expected hostnames reported in, say, Angry IP Scanner. I'm hesitant to suggest the above is a universal solution but it works for me. Regards, Kent PS - I'm doped up with cold meds; any mistakes here are their fault! Footnotes: [1] yes, I know why this occurs. Someday I'll post an issue to the repo. [2] it's especially annoying because I haven't nailed down the circumstances under which this happens and when it doesn't [3] I should note that my LAN all the way through to the Internet is dual IPv4/IPv6. As an aside, this also seems to introduce an issue that crops up when moOde is configured to use a static IP, but that is properly the subject of another thread when i can get around to it. RE: moOde sometimes shows up LAN as <hostname>-2.local - DRONE7 - 02-02-2025 Code: :~$ sudo arp-scan --localnet --ouifile=/usr/share/arp-scan/ieee-oui.txt --macfile=/etc/arp-scan/mac-vendor.txt This resolves to one ip once fully booted. RE: moOde sometimes shows up LAN as <hostname>-2.local - Tim Curtis - 02-02-2025 My Mac for example sometimes has moode and moode-2 in its Network locations. I'll try the avahi change and see what happens. RE: moOde sometimes shows up LAN as <hostname>-2.local - TheOldPresbyope - 02-02-2025 (02-02-2025, 08:33 PM)DRONE7 Wrote: Suppose I have a moOde player with hostname moode and IP address 10.0.0.32. If I boot it several times, I can still reach it at 10.0.0.32* but whether or not I can reach it at moode.local depends on the avahi-daemon issue. I think this early duplication you observe is what leads to the (buggy) avahi-daemon behavior. I've just seen it suggested on the InterWeb that a workaround is to stick a line in rc.local to restart avahi-daemon after the system has finished booting. (@Tim Curtis ) I confess I didn't try modifying rc.local but seems like it may work just as well as my first suggestion. Regards, Kent * assuming the lease hasn't timed out and DHCP perversely assigned a different IP address to the MAC. |