[Bug 1158686] Re: When restarting avahi-daemon cups does not reconnect to it - workaround

Mauro 1158686 at bugs.launchpad.net
Wed Apr 17 15:18:28 UTC 2013


Requested info are attached.

dpkg -s avahi-daemon
Package: avahi-daemon
Status: install ok installed
Priority: optional
Section: net
Installed-Size: 341
Maintainer: Ubuntu Developers <ubuntu-devel-discuss at lists.ubuntu.com>
Architecture: amd64
Multi-Arch: foreign
Source: avahi
Version: 0.6.31-1ubuntu3
Depends: libavahi-common3 (>= 0.6.16), libavahi-core7 (>= 0.6.24), libc6 (>= 2.14), libcap2 (>= 2.10), libdaemon0 (>= 0.13), libdbus-1-3 (>= 1.1.1), libexpat1 (>= 2.0.1), upstart-job, upstart (>= 0.6.7-4), adduser, dbus (>= 1.2.16-0ubuntu3), lsb-base (>= 3.0-6), bind9-host | host
Recommends: libnss-mdns
Suggests: avahi-autoipd
Conffiles:
 /etc/default/avahi-daemon 292bdbb95b392a71a0c363eb58b3a119
 /etc/network/if-up.d/avahi-daemon 19057755be7963e97943d32a959d5193
 /etc/resolvconf/update-libc.d/avahi-daemon 2cf53ff5a00f9d1fed653a2913de5bc7
 /etc/avahi/hosts 186990ae1edac95a88dbef6a36a07716
 /etc/avahi/avahi-daemon.conf bd8d4eda789abe26c48c1f1f74d19551
 /etc/dbus-1/system.d/avahi-dbus.conf 4b8ff37c10615ae704b7827a438ff534
 /etc/init/avahi-daemon.conf 0303b3961d5ffee8f05805b1dd06f475
 /etc/init/avahi-cups-reload.conf 56a60d600cd80a95f2e3b6909c3bda74
Description: Avahi mDNS/DNS-SD daemon
 Avahi is a fully LGPL framework for Multicast DNS Service Discovery.
 It allows programs to publish and discover services and hosts
 running on a local network with no specific configuration. For
 example you can plug into a network and instantly find printers to
 print to, files to look at and people to talk to.
 .
 This package contains the Avahi Daemon which represents your machine
 on the network and allows other applications to publish and resolve
 mDNS/DNS-SD records.
Homepage: http://avahi.org/
Original-Maintainer: Utopia Maintenance Team <pkg-utopia-maintainers at lists.alioth.debian.org>


** Attachment added: "avahi-daemon_bug_attachments.zip"
   https://bugs.launchpad.net/ubuntu/+source/avahi/+bug/1158686/+attachment/3646571/+files/avahi-daemon_bug_attachments.zip

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to avahi in Ubuntu.
https://bugs.launchpad.net/bugs/1158686

Title:
  When restarting avahi-daemon cups does not reconnect to it -
  workaround

Status in “avahi” package in Ubuntu:
  Fix Released

Bug description:
  I use CUPS with shared printers and the shared printers are Bonjour-
  broadcasted by Avahi. This works well when avahi-daemon is started
  before cups and both keep running. But if I restart (stop and start
  gain) avahi-daemon while CUPS is running, CUPS does not reconnect to
  avahi-daemon again and so stops broadcasting. What I expect is that
  CUPS reconnects after the restart of avahi-daemon. This can easily
  happen if for example the avahi-daemon package gets updated, avahi-
  daemon crashes, or the admin changes the configuration of avahi-
  daemon.

  I am using Ubuntu Raring (13.04) with CUPS 1.6.2.

  The real fix would need to be done in CUPS and therefore I did the
  following upstream bug report:

  https://www.cups.org/str.php?L4300

  For the time being until CUPS gets fixed I suggest the following
  workaround:

  If one adds the following lines to the end of the /etc/init/avahi-
  daemon.conf file

  ----------
  post-start script
      if lpstat -h localhost -r 2>/dev/null | grep -qv not; then
          killall -HUP cupsd
      fi
  end script
  ----------

  the CUPS daemon gets kicked after starting avahi-daemon and so
  reconnects. The "if" only comes true if "lpstat" is present and the
  answer of "lpstat -h localhost -r" does not contain "not", meaning
  that the CUPS daemon is running.

  This works at least for restarting the avahi-daemon by "stop avahi-
  daemon; ...; start avahi-daemon" (what happens when updating avahi-
  daemon) or by the "respawn" (what happens when avahi-daemon crashes).

  It does not work with "restart avahi-daemon". Any addition to my
  suggested workaround to make this work is welcome.

  Can this workaround be applied to Raring? Thanks.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/avahi/+bug/1158686/+subscriptions




More information about the foundations-bugs mailing list