mdns4_minimal switch off home-network

Bug #140663 reported by .Ru
66
This bug affects 12 people
Affects Status Importance Assigned to Milestone
nss-mdns (Debian)
Unknown
Unknown
nss-mdns (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

After installing of Ubuntu i can not access sites located in home-network. Internet is working fine.

Problem: ping <HOST>
unknown host <HOST>

BUT i can ping it through IP.

Also when i ask dig or nslookup about <HOST> - they all return right information.
So DNS is working, but my ubuntu refuses to use it. After googling and some dancing i found error.

Error is in nsswitch.conf.
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
in some way it refuses to use DNS.

I change it to
hosts: files dns
and all work fine.

PS Windows work fine without any bugs like this.

Revision history for this message
Vladimir Dobriakov (vladimir-geekq) wrote :

Same bug with Hardy Heron 8.04.

Workaround still works - changing nsswitch.conf helps.

Revision history for this message
Jasey (jason-rivers) wrote :

I think maybe you should be a little clearer on the issue here, useing <HOST> is a little broad.

the problem is not only on Ubuntu, but on Suse 10.3 (works find on Suse 10.2) Fedora 8, Debian Etch and CentOS 5 (of what I've tested)

we were using "ourdomain.com" internally for our machines until recently, we changed this to "ourdomain.local" to be a little clearer about where we were looking

using using the .com domain worked without any issues on nslookup and on a ping, using the .local domain works with nslookup but doesn't work with a ping.

now, replacing /lib/libnss_dns.so.2 on a suse 10.3 box with the file from suse 10.2 fixes this issue.

it also gets more interesting than that, because I have this issue on my Ubuntu 8.04 x64 system, infact on 3 of them, however, on my x86 32bit Ubuntu 8.04 (2 of them) I do _NOT_ have this issue.

part of the problem is the mdns info in /etc/nsswitch.conf - because you don't have mdns setup on your network, another part of the problem, is that you have "[NOTFOUND=return]" after mdns_minimal4 and dns, which means if the domain is multicast DNS domain (which by default a .local is) and it's not found in mdns_minimal (which it won't be because you don't have mDNS setup) then it will return "Host not found" - removing the "[NOTFOUND=return]" also fixes this problem - though lookup on a .local address is a little slower.

if you don't have mdns setup, then there is no real reason to have the mdns info in nsswitch.conf but given how I fixed this on Suse, it looks like it's possibly an issue with the 64bit version of libnss_dns.so.2

Confirming because I also have this issue on a multitude of systems.

Revision history for this message
Felix Leimbach (felix-leimbach) wrote :

Can confirm this with a fresh install of Hardy Heron 8.04.1:

On a properly set up mysite.local domain everything works, except ubuntu cannot resolve hostnames in the .local domain.

adjusting /etc/nsswitch.conf as follows solves the problem:
- hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
+ hosts: files dns

This is on a x64 system with glibc 2.7

Revision history for this message
Philipp (dergringo-deactivatedaccount) wrote :

Same here on Ubuntu Jaunty 32bit.
Changing /etc/nsswitch.conf helps too.

affects: ubuntu → nss-mdns (Ubuntu)
Revision history for this message
Arik Kfir (arikkfir) wrote :

Confirmed this on both Jaunty and Karmic 32bit.

I understand that the reason Ubuntu puts a [NOTFOUND=return] before dns is for performance reasons, however performance reasons should not cause usability problems, IMO. At the very least, as a user, I expect a way to control this behavior via some checkbox somewhere in my network preferences, or even better - during the installation process.

Of course, if Jasey is correct and there is actually a bug in libnss_dns.so.2, then the solution is probably to fix the bug rather than go around it...

Revision history for this message
Vitaliy Kulikov (slonua) wrote :

so, i had the same issue ... after some analyze, i decided to remove package 'libnss-mdns'.
after that file /etc/nsswitch.conf will be update automatically to

hosts: files dns

well, everything works perfect now.

using karmic.

Revision history for this message
spliffster (spliffster) wrote :

I also experinced problems with name resolution. problem was fixed by adjusting nsswitch.conf as described above.

splatter:/etc$ cat /etc/issue
Ubuntu 9.10 \n \l

splatter:/etc$ uname -a
Linux splatter 2.6.31-22-generic #63-Ubuntu SMP Wed Aug 18 22:54:26 UTC 2010 i686 GNU/Linux

Revision history for this message
Luca Bruno (lucab) wrote :
Revision history for this message
KAMI (kami911) wrote :

I am on natty and I have same problem. Is it possible to fix it in Ubuntu?

Using:

hosts: files dns

or

hosts: files mdns4_minimal dns mdns4

is okay, however the solution mentioned in http://avahi.org/wiki/AvahiAndUnicastDotLocal is not working for me.

Revision history for this message
Dan Bugglin (megazzt) wrote :

I just experienced this problem on 11.04, same line in nsswitch.conf. I do not know what triggered it. My symptoms were also slightly different... DNS was completely broken except when explicitly specifying a nameserver with nslookup.

Revision history for this message
Oscar Tiderman (oscar-tiderman) wrote :

This makes my Chromium browser completely useless, I solved it by editing /etc/nsswitch.conf to read:

hosts: files dns mdns4_minimal [NOTFOUND=retutrn] mdns4

and now it's back to speed again. Don't know if I should completely remove [NOTFOUND=retutrn] or if it's enough with the changed order?

Revision history for this message
LostinSpacetime (lostinspacetime) wrote :

I am having the same problem with a .local domain. Nslookup works fine as well as pinging the IP-adress, but pinging the hostname doesn't work. I deleted the [NOTFOUND=return] entry in the nsswithch.conf file for now, which solves the problem until a proper fix will be released.

Revision history for this message
Zaar Hai (haizaar) wrote :

Unfortunately its a still problem in Ubuntu 13.04. All those talks on the internet regarding that Ubuntu devs are ignorant of bug reports look to have some grounds.

Anyway,
the finer solution to the problem is changing the nsswitch.conf as follows:

hosts: files mdns4_minimal [NOTFOUND=continue] dns mdns4

I've put "continue" instead of "return". This way you can still stay with mdns.

Details: The problem is that .local domain in LAN is managed by DNS and not mdns. But default avahi (mdsn) configuration binds to ".local" domain. I think changing domain-name parameter in /etc/avahi/avahi-daemon.conf to something else then "local" (which is default) would solve this problem as we..

Revision history for this message
ssducf (ssd-ubu) wrote :

The real problem may be that your avahi daemon has crashed.
Try
   service avahi-daemon restart

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.