Avahi reports IPv6/IPv4 and "dnssd" CUPS backend only tries IPv6, no IPv4 fallback #4305
Original bug report to Ubuntu:
If a network printer is discovered via Bonjour, Avahi lists it for both IPv4 and IPv6, even if the printer itself can only be accessed via IPv4. dnssd generates a device URI for the IPP backend with the IPv6 IP address and then tries to print with that URI and fails if the printer only supports IPv4. the dnssd backend should fall back to IPPv4 if the IPPv6 access to the printer fails.
Original bug description:
Avahi for default publishes services also in IPv6 as in /etc/avahi/avahi-daemon.conf there is
At the same time services are listening on IPv4 addresses only.
Cups is able to discover published printers via dnssd protocol but its ipp backend prints only on the IPv6 resolved address which does not answer and it does not try the IPv4 address.
Excerpt from "avahi-browse -a -t -r" to show the IPv6 and IPv4 addresses
= wlan0 IPv6 Hewlett-Packard HP LaserJet 1100 @ hjemme Internet Printer local
Excerpt from /var/log/cups/error_log to show that only IPv6 address is tried
I [13/Jan/2013:18:02:55 +0100] [Job 61] Started backend /usr/lib/cups/backend/dnssd (PID 7179)
D [13/Jan/2013:18:02:59 +0100] [Job 61] Set job-printer-state-message to "The printer is not responding.", current level=ERROR
CUPS.org User: mike
This is an Avahi bug - there is no zone ID in the address, and the address is link-local (zone ID required).
Just using the hostname (and praying that the distro/OS that is using Avahi has bothered to setup Avahi to do resolution of .local names) isn't going to help, all it will do is create another bug report that printing is "slow" because we'll try IPv6 and then fall back to IPv4 when the IPv6 connection times out.