[cups.bugs] [HIGH] STR #4305: Avahi reports IPv6/IPv4 and "dnssd" CUPS backend only tries IPv6, no IPv4 fallback

till.kamppeter at gmail.com till.kamppeter at gmail.com
Wed Mar 27 12:08:18 PDT 2013


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Original bug report to Ubuntu:

https://bugs.launchpad.net/ubuntu/+source/cups/+bug/1099184

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:

----------
lsb_release -rd
Description: Ubuntu 12.04.1 LTS
Release: 12.04
---------------------------------
avahi-daemon 0.6.30-5ubuntu2
cups 1.5.3-0ubuntu6
--------------------------------

Avahi for default publishes services also in IPv6 as in
/etc/avahi/avahi-daemon.conf there is
use-ipv6=yes

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
+ wlan0 IPv4 Hewlett-Packard HP LaserJet 1100 @ hjemme Internet Printer
local
+ wlan0 IPv6 MobilIgor5a [00:26:82:9d:b9:6d] Workstation local
+ wlan0 IPv6 hjemme [00:40:f4:ff:55:32] Workstation local

[....]

= wlan0 IPv6 Hewlett-Packard HP LaserJet 1100 @ hjemme Internet Printer
local
   hostname = [hjemme.local]
   address = [fe80::240:f4ff:feff:5532]
   port = [631]
   txt = ["printer-type=0x900E" "printer-state=3" "Scan=F" "Sort=F"
"Bind=F" "Punch=F" "Collate=F" "Copies=F" "Staple=F" "Duplex=F" "Color=T"
"Fax=F" "Binary=F" "Transparent=F" "TLS=1.2"
"UUID=1577ef95-eecb-3eae-6d02-aa29003eb546" "URF=DM3"
"pdl=application/octet-stream,application/pdf,application/postscript,image/jpeg,image/png,image/urf"
"product=(HP LaserJet 1100xi Printer)" "priority=0" "note=hjemme"
"adminurl=http://hjemme.local:631/printers/Hewlett-Packard-HP-LaserJet-1100"
"ty=HP LaserJet 1100, hpcups 3.12.2"
"rp=printers/Hewlett-Packard-HP-LaserJet-1100" "qtotal=1" "txtvers=1"]
= wlan0 IPv6 hjemme Remote Disk Management local
   hostname = [hjemme.local]
   address = [fe80::240:f4ff:feff:5532]
   port = [22]
   txt = []
= wlan0 IPv6 hjemme [00:40:f4:ff:55:32] Workstation local
   hostname = [hjemme.local]
   address = [fe80::240:f4ff:feff:5532]
   port = [9]
   txt = []
= wlan0 IPv4 Hewlett-Packard HP LaserJet 1100 @ hjemme Internet Printer
local
   hostname = [hjemme.local]
   address = [192.168.1.2]
   port = [631]
   txt = ["printer-type=0x900E" "printer-state=3" "Scan=F" "Sort=F"
"Bind=F" "Punch=F" "Collate=F" "Copies=F" "Staple=F" "Duplex=F" "Color=T"
"Fax=F" "Binary=F" "Transparent=F" "TLS=1.2"
"UUID=1577ef95-eecb-3eae-6d02-aa29003eb546" "URF=DM3"
"pdl=application/octet-stream,application/pdf,application/postscript,image/jpeg,image/png,image/urf"
"product=(HP LaserJet 1100xi Printer)" "priority=0" "note=hjemme"
"adminurl=http://hjemme.local:631/printers/Hewlett-Packard-HP-LaserJet-1100"
"ty=HP LaserJet 1100, hpcups 3.12.2"
"rp=printers/Hewlett-Packard-HP-LaserJet-1100" "qtotal=1" "txtvers=1"]

----------------
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:55 +0100] [Job 61] Resolving "Hewlett-Packard HP
LaserJet 1100 @ hjemme._ipp._tcp.local"...
D [13/Jan/2013:18:02:55 +0100] [Job 61] STATE: +connecting-to-device
D [13/Jan/2013:18:02:55 +0100] [Job 61] Resolving "Hewlett-Packard HP
LaserJet 1100 @ hjemme", regtype="_ipp._tcp", domain="local."...
D [13/Jan/2013:18:02:55 +0100] [Job 61] PPD uses qualifier 'Gray.Plain.'
D [13/Jan/2013:18:02:55 +0100] [Job 61] Calling
FindDeviceById(LaserJet_1100xi_Printer)
D [13/Jan/2013:18:02:55 +0100] [Job 61] Failed to send:
org.freedesktop.ColorManager.Failed:device id 'LaserJet_1100xi_Printer'
does not exists
D [13/Jan/2013:18:02:55 +0100] [Job 61] Failed to get profile filename!
I [13/Jan/2013:18:02:55 +0100] [Job 61] no profiles specified in PPD
D [13/Jan/2013:18:02:55 +0100] [Job 61] Set job-printer-state-message to
"no profiles specified in PPD", current level=INFO
D [13/Jan/2013:18:02:55 +0100] [Job 61] Ghostscript command line:
/usr/bin/gs -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH -dNOINTERPOLATE
-sDEVICE=cups -sstdout=%stderr -sOutputFile=%stdout -sMediaType=Plain
-sOutputType=0 -r600x600 -dMediaPosition=7 -dDEVICEWIDTHPOINTS=595
-dDEVICEHEIGHTPOINTS=841 -dcupsBitsPerColor=1 -dcupsColorOrder=0
-dcupsColorSpace=3 -dcupsRowCount=1 -dcupsRowStep=2 -dcupsInteger0=26
-scupsPageSizeName=A4 -I/usr/share/cups/fonts -c -f -_
D [13/Jan/2013:18:02:55 +0100] [Job 61]
envp[0]="CUPS_CACHEDIR=/var/cache/cups"
D [13/Jan/2013:18:02:55 +0100] [Job 61]
envp[1]="CUPS_DATADIR=/usr/share/cups"
D [13/Jan/2013:18:02:55 +0100] [Job 61]
envp[2]="CUPS_DOCROOT=/usr/share/cups/doc-root"
D [13/Jan/2013:18:02:55 +0100] [Job 61]
envp[3]="CUPS_FONTPATH=/usr/share/cups/fonts"
D [13/Jan/2013:18:02:55 +0100] [Job 61]
envp[4]="CUPS_REQUESTROOT=/var/spool/cups"
D [13/Jan/2013:18:02:55 +0100] [Job 61]
envp[5]="CUPS_SERVERBIN=/usr/lib/cups"
D [13/Jan/2013:18:02:55 +0100] [Job 61]
envp[6]="CUPS_SERVERROOT=/etc/cups"
D [13/Jan/2013:18:02:55 +0100] [Job 61]
envp[7]="CUPS_STATEDIR=/var/run/cups"
D [13/Jan/2013:18:02:55 +0100] [Job 61] envp[8]="HOME=/var/spool/cups/tmp"
D [13/Jan/2013:18:02:55 +0100] [Job 61]
envp[9]="PATH=/usr/lib/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin"
D [13/Jan/2013:18:02:55 +0100] [Job 61]
envp[10]="SERVER_ADMIN=root at MobilIgor5a"
D [13/Jan/2013:18:02:55 +0100] [Job 61] envp[11]="SOFTWARE=CUPS/1.5.3"
D [13/Jan/2013:18:02:55 +0100] [Job 61] envp[12]="USER=root"
D [13/Jan/2013:18:02:55 +0100] [Job 61]
envp[13]="CUPS_SERVER=/var/run/cups/cups.sock"
D [13/Jan/2013:18:02:55 +0100] [Job 61]
envp[14]="CUPS_ENCRYPTION=IfRequested"
D [13/Jan/2013:18:02:55 +0100] [Job 61] envp[15]="IPP_PORT=631"
D [13/Jan/2013:18:02:55 +0100] [Job 61] envp[16]="CHARSET=utf-8"
D [13/Jan/2013:18:02:55 +0100] [Job 61] envp[17]="LANG=en_US.UTF-8"
D [13/Jan/2013:18:02:55 +0100] [Job 61]
envp[18]="PPD=/etc/cups/ppd/LaserJet_1100xi_Printer.ppd"
D [13/Jan/2013:18:02:55 +0100] [Job 61] envp[19]="RIP_MAX_CACHE=128m"
D [13/Jan/2013:18:02:55 +0100] [Job 61]
envp[20]="CONTENT_TYPE=application/pdf"
D [13/Jan/2013:18:02:55 +0100] [Job 61]
envp[21]="DEVICE_URI=dnssd://Hewlett-Packard%20HP%20LaserJet%201100%20%40%20hjemme._ipp._tcp.local/cups"
D [13/Jan/2013:18:02:55 +0100] [Job 61]
envp[22]="PRINTER_INFO=LaserJet_1100xi_Printer"
D [13/Jan/2013:18:02:55 +0100] [Job 61]
envp[23]="PRINTER_LOCATION=MobilIgor5a"
D [13/Jan/2013:18:02:55 +0100] [Job 61]
envp[24]="PRINTER=LaserJet_1100xi_Printer"
D [13/Jan/2013:18:02:55 +0100] [Job 61]
envp[25]="PRINTER_STATE_REASONS=none"
D [13/Jan/2013:18:02:55 +0100] [Job 61] envp[26]="CUPS_FILETYPE=document"
D [13/Jan/2013:18:02:55 +0100] [Job 61]
envp[27]="FINAL_CONTENT_TYPE=printer/LaserJet_1100xi_Printer"
D [13/Jan/2013:18:02:55 +0100] [Job 61] envp[28]="AUTH_INFO_REQUIRED=none"
I [13/Jan/2013:18:02:55 +0100] [Job 61] Start rendering...
D [13/Jan/2013:18:02:55 +0100] [Job 61] Set job-printer-state-message to
"Start rendering...", current level=INFO
I [13/Jan/2013:18:02:55 +0100] [Job 61] Processing page 1...
D [13/Jan/2013:18:02:55 +0100] [Job 61] Set job-printer-state-message to
"Processing page 1...", current level=INFO
D [13/Jan/2013:18:02:55 +0100] [Job 61] Resolved as
"ipp://[fe80::240:f4ff:feff:5532]:631/printers/Hewlett-Packard-HP-LaserJet-1100"...
D [13/Jan/2013:18:02:55 +0100] [Job 61] STATE:
-connecting-to-device,offline-report
D [13/Jan/2013:18:02:55 +0100] [Job 61] Executing backend
"/usr/lib/cups/backend/ipp"...
D [13/Jan/2013:18:02:55 +0100] [Job 61] Sending stdin for job...
D [13/Jan/2013:18:02:55 +0100] [Job 61] update_reasons(attr=0(),
s="+connecting-to-device")
d [13/Jan/2013:18:02:55 +0100] [Job 61] op='+', new_reasons=1,
state_reasons=1
D [13/Jan/2013:18:02:55 +0100] [Job 61] STATE: +connecting-to-device
D [13/Jan/2013:18:02:55 +0100] [Job 61] Looking up
"fe80::240:f4ff:feff:5532"...
D [13/Jan/2013:18:02:55 +0100] [Job 61] PAGE: 1 1
D [13/Jan/2013:18:02:57 +0100] [Job 61] prnt/hpcups/HPCupsFilter.cpp 686:
First raster data plane..DEBUG2: hrDeviceDesc="Unknown"
D [13/Jan/2013:18:02:59 +0100] [Job 61] prtGeneralCurrentLocalization type
is 0, expected 2!
D [13/Jan/2013:18:02:59 +0100] [Job 61] backendWaitLoop(snmp_fd=6,
addr=0x7f9b29cfde68, side_cb=0x7f9b28cb8040)
D [13/Jan/2013:18:02:59 +0100] [Job 61] Connecting to
fe80::240:f4ff:feff:5532:631
I [13/Jan/2013:18:02:59 +0100] [Job 61] Connecting to printer.
D [13/Jan/2013:18:02:59 +0100] [Job 61] Set job-printer-state-message to
"Connecting to printer.", current level=INFO
D [13/Jan/2013:18:02:59 +0100] [Job 61] Connection error: Invalid argument
E [13/Jan/2013:18:02:59 +0100] [Job 61] The printer is not responding.
D [13/Jan/2013:18:02:59 +0100] [Job 61] Set job-printer-state-message to
"The printer is not responding.", current level=ERROR
----------

Link: https://www.cups.org/str.php?L4305
Version: 1.6.2





More information about the cups mailing list