//cc’ing @Eric
Mike:
I think I came at the source of this problem a couple of nights ago, and performance has been far more stable since then.
It looks like Roon relies quite heavily on DNSSEC to obtain extended zone information not included with typical DNS queries. I came across these messages in /var/log/syslog (on the Roon Core Server) occurring quite frequently during periods of dropouts:
Apr 18 21:18:43 mahler systemd-resolved[13209]: DNSSEC validation failed for question api.tidalhifi.com IN A: failed-auxiliary
Apr 18 21:18:43 mahler systemd-resolved[13209]: DNSSEC validation failed for question metadata5.roonlabs.com IN SOA: failed-auxiliary
Apr 18 21:18:43 mahler systemd-resolved[13209]: DNSSEC validation failed for question metadata5.roonlabs.com IN A: failed-auxiliary
Apr 18 21:20:55 mahler systemd-resolved[13209]: Server 192.168.1.1 does not support DNSSEC, downgrading to non-DNSSEC mode.
The server “192.168.1.1” is my router at home running BIND 9, resolving local host names and forwarding all other queries to my upstream Internet provider’s DNS servers. It definitely does not support DNSSEC.
At the same time those errors were occurring, ones similar to the following were appearing in RoonServer_log.txt:
04/18 23:31:26 Warn: Error in web request https://api.tidalhifi.com/v1/featured/recommended/playlists?countryCode=US&sessionId=e0fa2982-e3f2-4abe-8131-c694735c141c&&offset=0&limit=30: NetworkError (Error: NameResolutionFailure)
04/18 23:32:39 Warn: Error in web request https://metadata5.roonlabs.com/md/4/translatealbumid?uid=ef2ed5fe-0916-4421-a412-10fbf2f6171a&lid=&token=f874a58a-e768-4f21-8e8d-705f8e35ea9a&collection=tidal-us&albumid=79004d5730303033303132333434&collection=tidal-us: NetworkError (Error: NameResolutionFailure)
So, I removed 192.168.1.1 from /etc/resolv.conf and put Google’s public DNS servers in there instead: 8.8.8.8 and 8.8.4.4. Then I did a “systemctl restart systemd-resolved.service”. Name resolution errors continued, as did dropouts.
At this point I’m suspecting something’s wrong with Ubuntu’s systemd-resolved service, something that stands in the middle between the applications and the system’s configured DNS servers. A completely unnecessary daemon, but one that just had to be invented, because Linux.
Default /etc/nsswitch.conf on Ubuntu Server 17.04:
hosts: files resolve [!UNAVAIL=return] dns
Changed to:
hosts: files dns
No further name resolution errors. Also:
- almost no dropouts with local content or Tidal, with DSP enabled or disabled. However, larger Tidal albums still drop out from time to time, especially when a new track starts playing.
- browsing through the Roon interface is much faster
- Roon still tends to have a complete meltdown if I’m upsampling a Tidal album and and then try and browse through a large Tidal album (like Georg Solti’s 15-CD Mozart operas collection). It’s almost like the sequence of timing between the Roon Core, Tidal, the HiFiBerry (RAAT) and the controlling client (MacBook Pro) falls apart.
So it would appear that having the “resolve” entry in /etc/nsswitch.conf was a major problem here, returning a “host not found” error to Roon with DNSSEC queries. Something to keep in mind as you put together a customized version of Linux for ROCK.
-Adam.