[Gutsy SRU Request] Bad interaction with avahi
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
avahi (Ubuntu) |
Fix Released
|
Medium
|
Till Kamppeter | ||
Gutsy |
Fix Released
|
Undecided
|
Unassigned | ||
cupsys (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Gutsy |
Fix Released
|
Undecided
|
Martin Pitt |
Bug Description
Binary package hint: cupsys
Exporting printers via avahi (i.e. mdns) doesn't work well on gutsy. The two problems I see are:
1) (fixed in avahi) On bootup cups gets started before avahi => Shared printers don't show up in mdns unless one restarts cups
2) (fixed in cupsys) Every morning when the log files get rotated, shared printers disappear from mdns. I haven't inspected this closer yet. The only way to fix it is restarting cups again.
Both problems are quite annoying because Mac OS X 10.5 (Leopard) clients only see printers shared via mdns, normal cups broadcasts get ignored. So currently we have to restart cups every morning so OS X users can print.
TEST CASE:
1) Fix in avahi
Reboot your system and do
sudo apt-get install avahi-utils
avahi-browse -k -t -v -r -a
Does the output contain IPP printer entries representing the queues of your local CUPS daemon?
2) Fix in cupsys
Get your network's broadcast address(es) via the "ifconfig" command. This is the address/these are the addresses after "BCast:" in the sections of each interface representing a local network (in most cases everything except "lo").
Now edit /etc/cups/
BrowseAddress <broadcast address>:631
for each of your broadcast addresses.
Now do two attempts of restarting CUPS:
a) sudo /etc/init.d/cupsys restart: After this kind of restart you will always have broadcasting of local printers working, with or without this bug present.
b) sudo killall -HUP cupsd: After this restart broadcasting will stop if this bug is present.
For testing the presence of CUPS' broadcasting, either do
sudo apt-get install avahi-utils
avahi-browse -k -t -v -r -a
or see whether your print queues appear on another Linux box in your network which runs CUPS (and has listening for broadcasts activated).
Related branches
Changed in avahi: | |
assignee: | nobody → till-kamppeter |
status: | Triaged → Fix Committed |
Changed in cupsys: | |
status: | Incomplete → Fix Committed |
description: | updated |
(1) has to be fixed in the avahi-daemon package. The startup links for /etc/init. d/avahi- daemon have to be renamed from S24avahi-daemon to S18avahi-daemon to start before CUPS (s19cupsys). Moving cupsys is not possible as it has to start before Samba, otherwise sharing printers via Samba will stop working. See current start order here:
till@till-laptop:~$ ls /etc/rc5.d/*cupsys* d/S19cupsys d/S24avahi- daemon
/etc/rc5.
till@till-laptop:~$ ls /etc/rc5.d/*samba*
/etc/rc5.d/S20samba
till@till-laptop:~$ ls /etc/rc5.d/*avahi*
/etc/rc5.
till@till-laptop:~$
(2) I cannot reproduce this on both Gutsy and Hardy.
If I force a logrotate
sudo /usr/sbin/logrotate -f /etc/logrotate.conf
I still get my local queues being mDNS-broadcasted. Check this with
avahi-browse -k -t -v -r -a
(You need to install the "avahi-utils" from universe to do so).
Can you also do this test and in addition post your /etc/cups/ cupsd.conf?