title: avahi-daemon gets stuck registering a service I'm publishing with avahi-publish-service
body: <p>Occasionally, I notice that I can't detect services that I'm publishing via avahi (bonjour) on Ubuntu. For example, avahi-browse -a does not show the published service, and the browser does not resolve the published .local hostname. On the server side, I noticed the output of <code>ps</code> suggests that <code>avahi-daemon</code> is getting stuck registering the service:</p>
  
  <pre><code>ubuntu@node3:~$ ps aux | grep [a]vahi
  root     26584  0.0  0.0   4204   356 ?        S    19:21   0:00 supervise avahi
  ubuntu   26598  0.0  0.0   4216   352 ?        S    19:21   0:00 multilog s8388608 n10 /var/log/avahi
  avahi    28332  0.0  0.0  32352  1636 ?        S    20:19   0:00 avahi-daemon: registering [node3-44.local]
  avahi    28333  0.0  0.0  32224   468 ?        S    20:19   0:00 avahi-daemon: chroot helper
  root     28338  0.0  0.0  17192  1028 ?        S    20:19   0:00 avahi-publish-service -as node3 _foobar._tcp 8080
  </code></pre>
  
  <p>Here's what the output of this command looks like on an "unstuck" host:</p>
  
  <pre><code>ubuntu@node2:~$ ps aux | grep [a]vahi
  root     26501  0.0  0.0   4204   356 ?        S    19:21   0:00 supervise avahi
  ubuntu   26527  0.0  0.0   4216   352 ?        S    19:21   0:00 multilog s8388608 n10 /var/log/avahi
  avahi    29418  0.0  0.0  32484  1632 ?        S    20:12   0:00 avahi-daemon: running [node2.local]
  avahi    29419  0.0  0.0  32224   464 ?        S    20:12   0:00 avahi-daemon: chroot helper
  root     29425  0.0  0.0  17192  1032 ?        S    20:12   0:00 avahi-publish-service -as node2 _foobar._tcp 8080
  </code></pre>
  
  <p>I did see this old <a href="https://bugzilla.redhat.com/show_bug.cgi?id=450369" rel="nofollow">bug report</a>, which could be related. Sometimes killing <code>avahi-daemon</code> seems to fix the problem temporarily. Also, one attempt at rebooting a stuck machine worked. However, I'd like to understand why this is happening and how I can deal with the problem in the most robust way possible. Any ideas?</p>