nsswitch.conf configuration doesn't work with mdns hosts

Bug #1650555 reported by Alberto Donato
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

On a fresh Ubuntu 16.10 (yakkety) install, resolution of mDNS hosts doesn't work anymore (it used to in xenial)

I can resolve names with avahi-resolve but ssh,ping,etc. fail to resolve.

After some digging I found out that what's causing it is the "resolve" option in /etc/nsswitch.conf:

hosts: files resolve [!UNAVAIL=return] mdns4_minimal [NOTFOUND=return] dns

Changing it to

hosts: files mdns4_minimal [NOTFOUND=return] dns

(as it was on xenial) makes mDNS work again.

ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: libnss-resolve 231-9ubuntu2
ProcVersionSignature: Ubuntu 4.8.0-30.32-generic 4.8.6
Uname: Linux 4.8.0-30-generic x86_64
ApportVersion: 2.20.3-0ubuntu8
Architecture: amd64
Date: Fri Dec 16 15:16:38 2016
InstallationDate: Installed on 2016-10-22 (54 days ago)
InstallationMedia: Ubuntu 16.10 "Yakkety Yak" - Release amd64 (20161012.2)
SourcePackage: systemd
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Alberto Donato (ack) wrote :
Revision history for this message
Paul White (paulw2u) wrote :

Thanks, edit of nsswitch.conf worked for me. Also marking as affecting zesty.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in systemd (Ubuntu):
status: New → Confirmed
Paul White (paulw2u)
tags: added: zesty
Revision history for this message
Sebastian Malcolm (smalcolm) wrote :

Use the re-ordering of hosts line in nsswitch.conf posted by Mark Tearle in #1641328:
   files mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns

This is better than removing "resolve [!UNAVAIL=return]" because recent Ubuntu releases should continue to use systemd-resolved for name resolution. It's man page explains several benefits, see:
 https://www.freedesktop.org/software/systemd/man/systemd-resolved.service.html

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.