Bug #1001

Issue with local domain DNS resolution with Avahi installed

Added by jfulcher over 8 years ago. Updated over 8 years ago.

Target version:
Start date:
Due date:
% Done:



Not sure if Avahi is installed by default or part of the amahi time machine app. However my local domain has a suffix of .local. By default mDNS uses .local as well. This was interfering with .local name resolution on the local machine.

I resolved this from the info on this page:

I used option 2 - option 3 did not work.


#1 Updated by cpg over 8 years ago

  • Status changed from New to Assigned
  • Assignee set to cpg

Thanks for the head's up.

Amahi Time does in fact require avahi-daemon to run properly.

Can you describe the problem in more detail? Both your bug report and the original article report "having issues" resolving the .local domain. Is that consistent failures in reaching hosts (and apps?) or occasional failures to resolve, or ... ?

We may try a solution for this in the app, though this can be a delicate area. This bug will be a good reference point with a work-around.

For the record, in case the article vanishes, here is what it says about possible solutions:

There are 3 options for solving this issue:
1. Disable Avahi. I have a couple of network devices (a NAS device, printer, etc) that use it, so I didn't really want to disable it if I could avoid it.
2. Change the search order in /etc/nsswitch.conf so that unicast DNS will be tried before mDNS for .local, essentially "merging" the unicast and the multicast domain .local, with unicast taking precedence.
3. Change the mDNS domain from .local to something else, like .alocal.

#2 Updated by jfulcher over 8 years ago


Here is one example - I have a local newznab server that runs on a different Ubuntu server. It uses DHCP to assign the IP address and updates the Amahi DNS server via DHCP as expected.

From the Amahi HDA server I can "ping newznab", but I can not "ping newznab.local". If I do a dig dns resolves everything as it's supposed to. Based on some other info I found and the post I referenced it appears that mDNS also uses .local as it's suffix. So it searches .local via mDNS in which my newznab.local machine can't be looked up and it just stops at that point. I believe that if I had a different DNS suffix other than .local - such as .home or anything else I wouldn't encounter this.

Here is an apaste of my current nsswitch.conf, a ping of both newznab and newznab.local, as well as a dig of newznab.local as well.
root@hda:/# ping newznab.local | apaste
ping: unknown host newznab.local

Apparently this stems from some new way Ubuntu 12.04 resolves DNS. Some people also reported success removing the dynamic resolv-conf app, but I was worried that would cause issue in other areas.

So if I modify my nsswitch.conf to the following it resolves the problem.

One thing to note is from any other machine on my LAN i could resolve .local addresses just fine - this is all local resolution on the HDA. So the main issue ends up being with apps on the HDA interacting with apps on other machines. In my case with sabnzbdplus interacting with my separate newznab server.

Also available in: Atom