New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: dns service error: no such record #181
Comments
I just encountered same issue, this issue was really weird. I connected my home network via OpenVPN TAP (note that is NOT TUN device) on my macOS. because i want to connect airplay capable devices on outside places even i'm away from home to develop airplay related package at coffee shop (cafe). Every discovery attempts are failed quickly, and i can't discover any services. but macOS displays my Airplay devices correctly (see below screenshot), and i can see mdns query/response packets on Wireshark. Packets seems okay. Interesting point is when i made OpenVPN connection via iPhone USB Tethering, This issue appears, but when makes OpenVPN connection via iPhone Wi-Fi Tethering, this issue are gone. |
Hi @hugovk what OS is this on? Assuming this is on linux it looks like a resolver issue. It's complicated but it often boils down to providing a custom resolver chain that handles ipV6 differently. Look at other applications using mdns. Note, that unlike your example the production code does not register an error handler. |
@mooyoul this seems to involve mDNS across a network gateway. Please file a separate issue and provide more information about the environment ... like the OS and such, not the coffee shop. |
@agnat Thanks for the pointers. I'm using macOS Sierra. I found this code in a few applications using mdns: mdns.Browser.defaultResolverSequence[1] = 'DNSServiceGetAddrInfo' in mdns.dns_sd
? mdns.rst.DNSServiceGetAddrInfo()
: mdns.rst.getaddrinfo({families:[4]}); Putting that at the top of chromecast-osx-audio's chromecast.js still results in "Error: dns service error: no such record". However, even though |
On OS X I'll test on sierra as soon as possible, but my gut feeling is that it is a local issue. My feeling is it has to do with ipV6 addresses. Try adding a few |
Fixed it! Or at least discovered how to make it work by updating my config and without hacking code. Quick test with With it enabled and disabled, http://test-ipv6.com gave 0/10:
I logged into my router, enabled IPv6 for the LAN, and now http://test-ipv6.com gives 10/10:
Ideally, it would be good for the application's code to work in the old config, but this is good enough for me. Thanks for the help! |
@agnat Please take a look 👍 thanks! |
Node 7.1.0
mdns 2.3.3
chromecast-osx-audio uses this mdns library, and I'm getting this error (see also: fardog/node-chromecast-osx-audio#11):
npm install -g chromecast-osx-audio
chromecast -l
Actual result:
Expected result:
I've managed to hack it to work by editing
/usr/local/lib/node_modules/chromecast-osx-audio/node_modules/mdns/lib/resolver_sequence_tasks.js:72:30
and changing:
to:
But it'd be nice to fix it properly.
chromecast-osx-audio calls mdns here: https://github.com/fardog/node-chromecast-osx-audio/blob/master/lib/chromecast.js
Here's a simplified version:
If I run it in Node's REPL:
I have just one Chromecast on the network at the moment, but when adding extra logging to
on_get_addr_info_done(sdRef, flags, iface, errorCode, hostname, address, context)
in resolver_sequence_tasks.js:it gives:
So the same service is coming through twice, with no error the first time, but "Error: dns service error: no such record" (-65554) and different flags, iface and context the second time.
Any idea what's the problem? Thanks!
The text was updated successfully, but these errors were encountered: