Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Multicast DNS (mDNS) discovery
#1
Hi,

I'm confused about the results from my mDNS discovery to find my Moode system.

My host name under system config is set to "master-bathroom". 

I have one system (as far as I know), but I get two identical results where the name is "moOde audio player: master-bathroom-2".

I would like to only get one result, w/o the "-2" at the end. Do you know what I can change to achieve this result?
Reply
#2
(03-03-2019, 12:19 PM)fabnavigator Wrote: Hi,

I'm confused about the results from my mDNS discovery to find my Moode system.

My host name under system config is set to "master-bathroom". 

I have one system (as far as I know), but I get two identical results where the name is "moOde audio player: master-bathroom-2".

I would like to only get one result, w/o the "-2" at the end. Do you know what I can change to achieve this result?

@fabnavigator

What do you mean by "my mDNS discovery"?

Regards,
Kent
Reply
#3
(03-03-2019, 02:39 PM)TheOldPresbyope Wrote:
(03-03-2019, 12:19 PM)fabnavigator Wrote: Hi,

I'm confused about the results from my mDNS discovery to find my Moode system.

My host name under system config is set to "master-bathroom". 

I have one system (as far as I know), but I get two identical results where the name is "moOde audio player: master-bathroom-2".

I would like to only get one result, w/o the "-2" at the end. Do you know what I can change to achieve this result?

@fabnavigator

What do you mean by "my mDNS discovery"?

Regards,
Kent
I'm doing a multicast DNS discovery to find systems on my network. https://en.wikipedia.org/wiki/Multicast_DNS
Reply
#4
What utility or application are u using to perform the discovery?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
I'm using the "node-red-node-discovery" node in the Node-RED application.  The node description is that it "Provides a Bonjour / Avahi / Zeroconf discovery node".
Reply
#6
(03-08-2019, 03:46 PM)fabnavigator Wrote: I'm using the "node-red-node-discovery" node in the Node-RED application.  The node description is that it "Provides a Bonjour / Avahi / Zeroconf discovery node".

As far as I can tell, neither the Linux avahi-browse application used in moOde for player discovery nor the mDNS discovery apps on my Android phone add any ornamentation to the hostname strings they report.

Looks like you need to explore the documentation and code for node-red-node-discovery.

You can play with avahi-browse from the CLI in moOde to see what services are being offered on your LAN. Compare them with what you see in node-red-node-discovery.

Regards,
Kent
Reply
#7
(03-08-2019, 04:45 PM)TheOldPresbyope Wrote:
(03-08-2019, 03:46 PM)fabnavigator Wrote: I'm using the "node-red-node-discovery" node in the Node-RED application.  The node description is that it "Provides a Bonjour / Avahi / Zeroconf discovery node".

As far as I can tell, neither the Linux avahi-browse application used in moOde for player discovery nor the mDNS discovery apps on my Android phone add any ornamentation to the hostname strings they report.

Looks like you need to explore the documentation and code for node-red-node-discovery.

You can play with avahi-browse from the CLI in moOde to see what services are being offered on your LAN. Compare them with what you see in node-red-node-discovery.

Regards,
Kent
I did that and below is what I got back for moOde systems. The duplicates seem to be for IPv4 and IPv6. But, where does the "-2" come from? My host name in moOde config doesn't include the "-2".

$ avahi-browse -at

+   eth0 IPv6 moOde audio player: master-bathroom-2         Web Site             local
+   eth0 IPv4 moOde audio player: master-bathroom-2         Web Site             local
+   eth0 IPv6 master-bathroom-2                             Remote Disk Management local
+   eth0 IPv4 master-bathroom-2                             Remote Disk Management local
Reply
#8
Examine the following files and verify correct hostname

/etc/hostname
/etc/hosts

The avahi service name is generated dynamically in this file via %h
/etc/avahi/services/moode.service
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#9
(03-08-2019, 05:40 PM)Tim Curtis Wrote: Examine the following files and verify correct hostname

/etc/hostname
/etc/hosts

The avahi service name is generated dynamically in this file via %h
/etc/avahi/services/moode.service
Here are my files:

/etc/hostname:

master-bathroom

/etc/hosts:

127.0.0.1       localhost
::1             localhost ip6-localhost ip6-loopback
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters

127.0.1.1       master-bathroom
Reply
#10
(03-08-2019, 05:58 PM)fabnavigator Wrote:
(03-08-2019, 05:40 PM)Tim Curtis Wrote: Examine the following files and verify correct hostname

/etc/hostname
/etc/hosts

The avahi service name is generated dynamically in this file via %h
/etc/avahi/services/moode.service
Here are my files:

/etc/hostname:

master-bathroom

/etc/hosts:

127.0.0.1       localhost
::1             localhost ip6-localhost ip6-loopback
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters

127.0.1.1       master-bathroom

Found on the ArchWiki (https://wiki.archlinux.org/index.php/avahi)

Quote:Troubleshooting

Hostname changes with appending incrementing numbers

This is a known bug that is caused by a hostname race condition. One possible workaround is disabling IPv6 to attempt to prevent the race condition. If multiple interfaces are present use allow-interfaces to limit Avahi to a single interface. Another possible workaround is to disable the cache to prevent Avahi from checking for host name conflicts altogether, but this prevents Avahi from performing lookups.

Certainly, wasn't known to me  Tongue

Since the bug has never occurred in my environment, I can't attest to the workarounds. Disabling IPv6 would be easy but IPv6 is enabled on my hosts (although not in use) so there you are. Are you perhaps using multiple interfaces?

Regards,
Kent
Reply


Forum Jump: