1

I've searched for clues to this problem for days, hope someone here can shed some light. I know I can use IP addresses only for this simple case and I know about other solutions like DNSmasq, but I'm interested in finding an answer to this puzzling problem.

Setup:

  • Desktop with fresh install Ubuntu Gnome 15.10
  • Server with fresh install Ubuntu Server 15.10
  • avahi-daemon running on both
  • one change to /etc/avahi/avahi-daemon.conf on both: use-ipv6=no
  • ufw inactive on both

From the desktop:

user@desktop:~$ avahi-browse -art
+ wlp1s0 IPv4 server [94:db:c9:b5:39:26]           Workstation          local
+ wlp1s0 IPv4 desktop [4c:34:88:c1:b0:4c]          Workstation          local
= wlp1s0 IPv4 desktop [4c:34:88:c1:b0:4c]          Workstation          local
   hostname = [desktop.local]
   address = [192.168.1.104]
   port = [9]
   txt = []
= wlp1s0 IPv4 server [94:db:c9:b5:39:26]           Workstation          local
   hostname = [server.local]
   address = [192.168.1.120]
   port = [9]
   txt = []

From the server:

user@server:~$ avahi-browse -art
+ wlp3s0 IPv4 desktop [4c:34:88:c1:b0:4c]          Workstation          local
+ wlp3s0 IPv4 server [94:db:c9:b5:39:26]           Workstation          local
= wlp3s0 IPv4 server [94:db:c9:b5:39:26]           Workstation          local
   hostname = [server.local]
   address = [192.168.1.120]
   port = [9]
   txt = []
= wlp3s0 IPv4 desktop [4c:34:88:c1:b0:4c]          Workstation          local
   hostname = [desktop.local]
   address = [192.168.1.104]
   port = [9]
   txt = []

Avahi-browse finds the correct IP addresses for both machines, but here's the problem:

From the desktop: (ping, ssh, etc. all work as expected)

user@desktop:~$ ping server.local
PING server.local (192.168.1.120) 56(84) bytes of data.
64 bytes from 192.168.1.120: icmp_seq=1 ttl=64 time=3.45 ms
...

From the server: (unknown host??? WTF)

user@server:~$ ping desktop.local
ping: unknown host desktop.local

Anyone have any ideas?

4
  • personally I have always found avahi to be buggy, and, IMHO, dnsmasq is a fast and easy fix - wiki.debian.org/HowTo/dnsmasq
    – Panther
    Mar 25, 2016 at 17:56
  • Have you compared the /etc/nsswitch.conf files on the two machines (in particular the order of entries in the hosts line? Mar 25, 2016 at 17:57
  • @bodhi.zazen Not interested in DNSmasq.
    – mlinfoot
    Mar 25, 2016 at 17:59
  • @steeldriver nsswitch.conf files are identical. The hosts line is: hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname
    – mlinfoot
    Mar 25, 2016 at 18:00

1 Answer 1

0

I found the cause of my problem and am posting it here in case it might help any others finding themselves in a similar situation.

Make sure the host name is the same in both /etc/hosts and /etc/hostname. For some reason, they were different on my server -- corrected that and avahi is now working as intended.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .