CUPS.org User: mtin
There is a bug with the way the CUPS web administration portal(the interface on http://localhost:631) handles autodetected CUPS printers, if that printer only allows LPD printing.
Normally, LPD printers have a URI of lpd://:/queuename. /usr/lib/cups/backend/lpd more specifically will NOT allow you to print without a queuename attached.
The problem is that OpenSolaris CUPS (or maybe CUPS in general) has when it autodetects network printers is that it is impossible to edit the printer URI once it has been "detected" by the CUPS web interface. When you use the autodetect my printer feature, it fill outs the URI as lpd://:port, but it misses detecting the LPD queue name. It is also impossible to modify it from the web interface from the printer administration page. At no point does it even bother to ask you what the queue names are after it autodetects the printer as an LPD printer, nor does it warn you that you need to fill in a queue name. Instead, it silently happily accepts the auto-detected configuration and tries to print, at which point it bombs out.
It fails with some obscure message of:
D [01/Oct/2010:15:21:43 +0800] [Job 3] lpd_command returning -1
D [01/Oct/2010:15:21:43 +0800] [Job 3] Backend returned status 1 (failed)
D [01/Oct/2010:15:21:43 +0800] [Job 3] Printer stopped due to backend errors; please consult the error_log file for details.
D [01/Oct/2010:15:21:43 +0800] [Job 3] End of messages
D [01/Oct/2010:15:21:43 +0800] [Job 3] printer-state=5(stopped)
D [01/Oct/2010:15:21:43 +0800] [Job 3] printer-state-message="/usr/lib/cups/backend/lpd failed"
The solution I have found is to add the printer manually as an LPD/LPR printer, at which case you can fill in the LPD URI.
The only reason I solved this problem is that at this point, the CUPS interface shows you an example of an LPD URI which looks like:
At that point, I could print quite happily and all was fine. CUPS should warn you at even after it autodetects the LPD IP address, it still requires a queue name to complete the add process. I kind of assumed that CUPS had some sort of default queue name or something, but clearly this is not the case. And on a second note, the CUPS printer URI should be editable in the modify printer administration option.
CUPS.org User: mike
Fixed in Subversion repository.
The issue is more that SNMP-based auto-detection cannot always find the queue name to use, but the attached patch checks for lpd://hostname without a queue name and shows the manual URI entry form if so...
--- cgi-bin/admin.c (revision 9428)
+++ cgi-bin/admin.c (working copy)
@@ -1,9 +1,9 @@
(!strncmp(var, "lpd://", 6) && !strchr(var + 6, '/')))