[Bug 1641328] [NEW] Ordering of mdns4_minimal and resolve in /etc/nsswitch.conf causes mDNS lookups to fail
Mark Tearle
mark at tearle.com
Sat Nov 12 16:02:10 UTC 2016
Public bug reported:
(See also libnss-resolve:amd64 231-9ubuntu1 amd64 nss module to
resolve names via systemd-resolved)
# fresh install of yakkety
mtearle at liberation:/etc$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.10
Release: 16.10
Codename: yakkety
# package details
mtearle at liberation:~$ apt-cache policy libnss-resolve
libnss-resolve:
Installed: 231-9ubuntu1
Candidate: 231-9ubuntu1
Version table:
*** 231-9ubuntu1 500
500 http://mirror.rackspace.com/ubuntu yakkety-updates/main amd64 Packages
100 /var/lib/dpkg/status
231-9git1 500
500 http://mirror.rackspace.com/ubuntu yakkety/main amd64 Packages
mtearle at liberation:~$ apt-cache policy systemd
systemd:
Installed: 231-9ubuntu1
Candidate: 231-9ubuntu1
Version table:
*** 231-9ubuntu1 500
500 http://mirror.rackspace.com/ubuntu yakkety-updates/main amd64 Packages
100 /var/lib/dpkg/status
231-9git1 500
500 http://mirror.rackspace.com/ubuntu yakkety/main amd64 Packages
# attempt to ping VM elsewhere on network with mDNS hostname
mtearle at liberation:/etc$ ping bazzavan.local
ping: bazzavan.local: Name or service not known
# can find both ipv4 and ipv6 addresses for the host
mtearle at liberation:/etc$ avahi-resolve-host-name bazzavan.local
bazzavan.local fe80::a00:27ff:fea5:3f51
mtearle at liberation:/etc$ avahi-resolve-host-name -4 bazzavan.local
bazzavan.local 172.16.44.48
# can ping it
mtearle at liberation:/etc$ ping -c 1 172.16.44.48
PING 172.16.44.48 (172.16.44.48) 56(84) bytes of data.
64 bytes from 172.16.44.48: icmp_seq=1 ttl=64 time=0.265 ms
--- 172.16.44.48 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.265/0.265/0.265/0.000 ms
# original ordering
mtearle at liberation:/etc$ grep hosts /etc/nsswitch.conf
hosts: files resolve [!UNAVAIL=return] mdns4_minimal [NOTFOUND=return] dns
# go away and edit /etc/nsswitch.conf
# change ordering of resolve and mdns4_minimal
mtearle at liberation:/etc$ grep hosts /etc/nsswitch.conf
hosts: files mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns
# check mdns lookups now work, and it now pings
mtearle at liberation:/etc$ ping -c 1 bazzavan.local
PING bazzavan.local (172.16.44.48) 56(84) bytes of data.
64 bytes from 172.16.44.48 (172.16.44.48): icmp_seq=1 ttl=64 time=0.161 ms
--- bazzavan.local ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.161/0.161/0.161/0.000 ms
# check libnss-resolve is still doing its thing
mtearle at liberation:/etc$ ping -c 1 localhost.localdomain
PING localhost.localdomain(localhost (::1%1)) 56 data bytes
64 bytes from localhost (::1): icmp_seq=1 ttl=64 time=0.016 ms
--- localhost.localdomain ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.016/0.016/0.016/0.000 ms
** Affects: systemd (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1641328
Title:
Ordering of mdns4_minimal and resolve in /etc/nsswitch.conf causes
mDNS lookups to fail
Status in systemd package in Ubuntu:
New
Bug description:
(See also libnss-resolve:amd64 231-9ubuntu1 amd64 nss module
to resolve names via systemd-resolved)
# fresh install of yakkety
mtearle at liberation:/etc$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.10
Release: 16.10
Codename: yakkety
# package details
mtearle at liberation:~$ apt-cache policy libnss-resolve
libnss-resolve:
Installed: 231-9ubuntu1
Candidate: 231-9ubuntu1
Version table:
*** 231-9ubuntu1 500
500 http://mirror.rackspace.com/ubuntu yakkety-updates/main amd64 Packages
100 /var/lib/dpkg/status
231-9git1 500
500 http://mirror.rackspace.com/ubuntu yakkety/main amd64 Packages
mtearle at liberation:~$ apt-cache policy systemd
systemd:
Installed: 231-9ubuntu1
Candidate: 231-9ubuntu1
Version table:
*** 231-9ubuntu1 500
500 http://mirror.rackspace.com/ubuntu yakkety-updates/main amd64 Packages
100 /var/lib/dpkg/status
231-9git1 500
500 http://mirror.rackspace.com/ubuntu yakkety/main amd64 Packages
# attempt to ping VM elsewhere on network with mDNS hostname
mtearle at liberation:/etc$ ping bazzavan.local
ping: bazzavan.local: Name or service not known
# can find both ipv4 and ipv6 addresses for the host
mtearle at liberation:/etc$ avahi-resolve-host-name bazzavan.local
bazzavan.local fe80::a00:27ff:fea5:3f51
mtearle at liberation:/etc$ avahi-resolve-host-name -4 bazzavan.local
bazzavan.local 172.16.44.48
# can ping it
mtearle at liberation:/etc$ ping -c 1 172.16.44.48
PING 172.16.44.48 (172.16.44.48) 56(84) bytes of data.
64 bytes from 172.16.44.48: icmp_seq=1 ttl=64 time=0.265 ms
--- 172.16.44.48 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.265/0.265/0.265/0.000 ms
# original ordering
mtearle at liberation:/etc$ grep hosts /etc/nsswitch.conf
hosts: files resolve [!UNAVAIL=return] mdns4_minimal [NOTFOUND=return] dns
# go away and edit /etc/nsswitch.conf
# change ordering of resolve and mdns4_minimal
mtearle at liberation:/etc$ grep hosts /etc/nsswitch.conf
hosts: files mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns
# check mdns lookups now work, and it now pings
mtearle at liberation:/etc$ ping -c 1 bazzavan.local
PING bazzavan.local (172.16.44.48) 56(84) bytes of data.
64 bytes from 172.16.44.48 (172.16.44.48): icmp_seq=1 ttl=64 time=0.161 ms
--- bazzavan.local ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.161/0.161/0.161/0.000 ms
# check libnss-resolve is still doing its thing
mtearle at liberation:/etc$ ping -c 1 localhost.localdomain
PING localhost.localdomain(localhost (::1%1)) 56 data bytes
64 bytes from localhost (::1): icmp_seq=1 ttl=64 time=0.016 ms
--- localhost.localdomain ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.016/0.016/0.016/0.000 ms
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1641328/+subscriptions
More information about the foundations-bugs
mailing list