Streampunk / ledger

NMOS discovery and registration APIs
Apache License 2.0
29 stars 6 forks source link

mDNS advertisement working on Linux? #22

Open ghost opened 7 years ago

ghost commented 7 years ago

Is ledger mDNS advertisement working on Linux platforms? I'm testing on Ubuntu 16.04 LTS and running Avahi discovery daemon to discover "_nmos-registration._tcp" devices and can't find Ledger.

danickd commented 7 years ago

It should work. I have it running on an embedded Linux platform without any issues.

krhoulberg commented 7 years ago

When I run "nmos-ledger" on Ubuntu 14.04 LTS from VirtualBox, avahi-browse all does not see the nmos registration or query. Also, the avahi-daemon fills the syslog with these messages when i run "nmos-ledger": Received response from host xxx.xxx.xxx.xxx with invalid source port 37974 on interface 'eth0.0' Received response from host xxx.xxx.xxx.xxx with invalid source port 57532 on interface 'eth0.0' Received response from host xxx.xxx.xxx.xxx with invalid source port 57531 on interface 'eth0.0' etc....

ghost commented 7 years ago

@danickd: as @krhoulberg reported, this is not working here too :(

peterbrightwell commented 7 years ago

Announcements not working (according to avahi-browse -a) for me on Ubuntu 14.04 LTS (physical) with NodeJS 6.9.2 LTS Ubuntu 16.04 LTS (vagrant/VirtualBox) with NodeJS 6.9.2 LTS

They are working (according to DNS-SD -B) on OSX 10.10.5 with NodeJS 4.3.0

Pete

thosil commented 7 years ago

It's perfectly working for me, but my linux server is not running avahi.

Ledger is using a fork of mdns-js, the "hello world mdns-js" specifies this:

var mdns = require('mdns-js');
//if you have another mdns daemon running, like avahi or bonjour, uncomment following line
//mdns.excludeInterface('0.0.0.0');

And regarding https://github.com/Streampunk/ledger/blob/master/api/RegistrationAPI.js#L347 the line is present but commented. Maybe we should have the option to activate it or not.

But even if avahi-browse -a does not show ledger, an nmos device is still able to register with it (don't know if it's a avahi-browse bug).

sparkpunkd commented 7 years ago

Ledger has been sitting off on a fork of mdns-js, nmos-mdns-js, waiting for a pull request to be merged. This was done 9 days ago, along with maintenance fixes to many other issues with mdns-js. I'm going to switch back to the core mdns-js library and see if that helps. Watch out for a new commit.

Generally, I've tested with MDNS-JS itself and dns-sd on MacOS/Windows, not avahi-browse on Linux. In another project, I've been struggling with other aspects of avahi on Ubuntu out-of-the-box, so I'll try some ledger in that environment this week and see if I can replicate.

sparkpunkd commented 7 years ago

Just checked ... our CI environment at https://circleci.com is set to use Ubuntu 12.04 and we have tests for MDNS-JS as a node client and registration server. The avahi daemon and client libraries are installed. See ...

https://circleci.com/docs/build-image-precise/