Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

[SOLVED] Cannot resolve .local host names via mDNS.
Thank you for your donation

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Solved: Cannot resolve .local host names via mDNS.
29th Jun, 2018, 09:58 AM
Post: #1
dreamweaver Offline
Registered
Posts: 7
Joined: Jul 2015
Reputation: 0
Cannot resolve .local host names via mDNS.
Software
XBian version: 20180627-0 (from /etc/motd)
XBMC/Kodi version: 17.6
Overclock settings: default

Hardware
Device type and model: Raspberry Pi 3 Model B
Power supply rating: 2A
SD card size and make/type: SanDisk EVO+ microSD 32GB
Network (Ethernet or wireless): Ethernet
Connected devices: TV

Problem description:
Cannot resolve .local host names via mDNS.

How to reproduce:
The following commands are run on the XBian system in an ssh session.

Avahi-daemon is running:
avahi 17390 1 0 Jun28 ? 00:00:00 avahi-daemon: running [xbian.local]
avahi 17392 17390 0 Jun28 ? 00:00:00 avahi-daemon: chroot helper

Host name resolution using the avahi tools works, e.g.
# avahi-resolve-host-name centos.local
centos.local 10.1.1.4

mDNS is configured in /etc/nsswitch.conf:
hosts: files mdns4_minimal [NOTFOUND=return] dns

However resolution of .local hosts fails:
# ping centos.local
ping: bad address 'centos.local'

I see the requests for .local hosts being passed through to DNS.
It is though the mdns4_minimal directive in nsswitch.conf is being ignored.

The same setup works fine in Raspbian.
Find all posts by this user
Quote this message in a reply
4th Jul, 2018, 04:00 AM (This post was last modified: 4th Jul, 2018 04:07 AM by Nachteule.)
Post: #2
Nachteule Offline
Administrator
******
Posts: 2,405
Joined: Dec 2014
Reputation: 122
RE: Cannot resolve .local host names via mDNS.
Hmm, actually I do not have a lot experience with that stuff, but

after installing avahi-utils package

Terminal

sudo apt-get install avahi-utils

it works out of the box without any additional configuration required:

Terminal

root@kmxbilr2 ~ # avahi-resolve-host-name kmcubie.local
kmcubie.local 192.168.1.6
root@kmxbilr2 ~ # ping kmcubie.local
PING kmcubie.local (192.168.1.6): 56 data bytes
64 bytes from 192.168.1.6: icmp_seq=0 ttl=64 time=1,353 ms
64 bytes from 192.168.1.6: icmp_seq=1 ttl=64 time=1,167 ms
^C--- kmcubie.local ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1,167/1,260/1,353/0,093 ms
root@kmxbilr2 ~ #

Entry in /etc/nsswitch was already there
Terminal

root@kmxbilr2 ~ # grep hosts /etc/nsswitch.conf
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4

Do you have mdns4 in your nsswitch.conf?

I can't find it in your post Dodgy, but after removing this parameter it's still working
Find all posts by this user
Quote this message in a reply
4th Jul, 2018, 04:33 AM
Post: #3
Nachteule Offline
Administrator
******
Posts: 2,405
Joined: Dec 2014
Reputation: 122
RE: Cannot resolve .local host names via mDNS.
Probably you're missing libnss-mdns package
Find all posts by this user
Quote this message in a reply
4th Jul, 2018, 09:55 AM
Post: #4
dreamweaver Offline
Registered
Posts: 7
Joined: Jul 2015
Reputation: 0
RE: Cannot resolve .local host names via mDNS.
Thanks Nachteule, installing libnss-mdns fixed the problem.
Find all posts by this user
Quote this message in a reply
4th Jul, 2018, 10:50 PM
Post: #5
Nachteule Offline
Administrator
******
Posts: 2,405
Joined: Dec 2014
Reputation: 122
RE: Cannot resolve .local host names via mDNS.
Fine, thanks for your response

I'm thinking about how to add this package to the standard image, because all my Pi installations have that package installed, and all that installations are 5 years old and originally based on Debian Wheezy. So, I would assume that when moved from Wheezy to Jessie that package was lost, probably due to a dropped dependency.

Set to solved
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 9th May, 2025, 09:47 PM Powered By MyBB, © 2002-2025 MyBB Group.