Unable to do nsswitch resolution on Avahi due to permissions issue
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
avahi (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I set up Avahi on two 16.04 systems, but was unable to resolve between them via ping; note, however, that avahi-resolve worked fine:
root@clients-1:~# avahi-resolve -n -4 kentest.local
kentest.local 192.168.243.16 # This is a good thing
These, not so much good:
root@clients-1:~# ping kentest.local
ping: unknown host kentest.local
My nsswitch.conf file was thus:
hosts: files mdns4_minimal [NOTFOUND=return] dns
I did a strace on the ping, and saw this:
sun_path=
The socket's permissions were fine, so I looked at the directory the socket was in and saw:
root@clients-1:~# ls -ald /var/run/
drwx------ 2 avahi avahi 80 Mar 27 05:35 /var/run/
It seemed to me this should have been okay -- I mean, I was trying the ping as root, and presumably user avahi would be servicing the request if it wasn't user root. But "Permission denied" is "permission denied," so I changed directory permissions and tried again:
root@clients-1:~# chmod 777 /var/run/
root@clients-1:~# ping kentest.local
PING kentest.local (192.168.243.16) 56(84) bytes of data.
64 bytes from 192.168.243.16: icmp_seq=1 ttl=64 time=1.31 ms
64 bytes from 192.168.243.16: icmp_seq=2 ttl=64 time=0.742 ms
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: avahi-daemon 0.6.32~
ProcVersionSign
Uname: Linux 4.4.0-66-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
Date: Mon Mar 27 14:55:01 2017
Ec2AMI: ami-00000004
Ec2AMIManifest: FIXME
Ec2Availability
Ec2InstanceType: GB.small
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
ProcEnviron:
TERM=xterm
SHELL=/bin/bash
PATH=(custom, no user)
LANG=en_US.UTF-8
XDG_RUNTIME_
SourcePackage: avahi
UpgradeStatus: No upgrade log present (probably fresh install)
Note that this bug report should be filed against package avahi-daemon, and not avahi, since avahi, itself, isn't even a package, but the Launcpad form wouldn't let me submit it as such.