[cups.general] Remote 'Get-Printer-Attributes' works for printers but not classes

Jim Ramsay i.am at jimramsay.com
Wed Jun 27 09:59:42 PDT 2007


I apologize for the lengthy note, but hopefully I've got enough detail
for someone to help me figure out what's going wrong!

I have the following setup:

Print server "altair" (Gentoo Linux, x86 architecture, with cups-1.2.11)
has a printer called "Samsung" and a class called "Laser" that includes
this Samsung printer (and one other printer, which has the same PPD but
is currently stopped, so should not be an issue here). It publishes both
of these to the local LAN.

Print client "cygnus" (Gentoo Linux, amd64 architecture, with
cups-1.2.11) has been configured to detect these printers from altair,
and they both show up in the web interface and 'lpstat -p'.

From either box, printing to either 'Samsung' or 'Laser' works just
great.

The problem is getting the printer options for the 'Laser'
class remotely.

Locally on the server, I can run 'lpoptions -p Samsung -l' and
'lpoptions -p Laser -l' and get identical output, which is exactly
what I would expect:

$ lpoptions -p Laser -l
Resolution/Resolution: *600 300
PageSize/Page Size: *Letter Legal A4 Executive Folio JB5 B5 A5 COM10 Monarch DL C5 C6 A6
PageRegion/PageRegion: Letter Legal A4 Executive Folio JB5 B5 A5 COM10 Monarch DL C5 C6 A6
InputSlot/Paper Source: *AUTO MANUAL
MediaType/Paper Type: *PRINTER Normal Thick Thin Bond OHP Card Label Used Color Env
JCLEconomode/Toner Save: *PRINTERDEFAULT SAVE STANDARD
JCLPowerSaveTime/Power Save Time: *min5 min10 min15 min30 min45 min60 NOTUSE

On cygnus, only getting the options for Samsung actually works, and
returns results identical to the output shown above.  However, when I
run 'lpoptions -p Laser -l' there, the commandline responds:
  lpoptions: Unable to open PPD file for Laser!

Here's what I get in my debug logs.  First, here is the output from a
run that works, 'lpoptions -p Samsung -l', on cygnus:

Cygnus's error_log has:

D [27/Jun/2007:09:36:36 -0400] cupsdAcceptClient: 8 from localhost (Domain)
D [27/Jun/2007:09:36:36 -0400] cupsdReadClient: 8 POST / HTTP/1.1
D [27/Jun/2007:09:36:36 -0400] cupsdAuthorize: No authentication data provided.
D [27/Jun/2007:09:36:36 -0400] CUPS-Get-Printers
D [27/Jun/2007:09:36:36 -0400] cupsdProcessIPPRequest: 8 status_code=0 (successful-ok)
D [27/Jun/2007:09:36:36 -0400] cupsdReadClient: 8 POST / HTTP/1.1
D [27/Jun/2007:09:36:36 -0400] cupsdAuthorize: No authentication data provided.
D [27/Jun/2007:09:36:36 -0400] CUPS-Get-Classes
D [27/Jun/2007:09:36:36 -0400] cupsdProcessIPPRequest: 8 status_code=0 (successful-ok)
D [27/Jun/2007:09:36:36 -0400] cupsdReadClient: 8 POST / HTTP/1.1
D [27/Jun/2007:09:36:36 -0400] cupsdAuthorize: No authentication data provided.
D [27/Jun/2007:09:36:36 -0400] CUPS-Get-Default
D [27/Jun/2007:09:36:36 -0400] cupsdProcessIPPRequest: 8 status_code=0 (successful-ok)
D [27/Jun/2007:09:36:36 -0400] cupsdCloseClient: 8
D [27/Jun/2007:09:36:36 -0400] cupsdAcceptClient: 8 from localhost (Domain)
D [27/Jun/2007:09:36:36 -0400] cupsdReadClient: 8 POST / HTTP/1.1
D [27/Jun/2007:09:36:36 -0400] cupsdAuthorize: No authentication data provided.
D [27/Jun/2007:09:36:36 -0400] Get-Printer-Attributes ipp://localhost/printers/Samsung
D [27/Jun/2007:09:36:36 -0400] cupsdProcessIPPRequest: 8 status_code=0 (successful-ok)
D [27/Jun/2007:09:36:36 -0400] cupsdCloseClient: 8

Altair's error_log has:

D [27/Jun/2007:09:36:43 -0600] cupsdAcceptClient: 9 from 172.16.0.7:631 (IPv4)
D [27/Jun/2007:09:36:43 -0600] cupsdReadClient: 9 GET /printers/Samsung.ppd HTTP/1.1
D [27/Jun/2007:09:36:43 -0600] cupsdAuthorize: No authentication data provided.
D [27/Jun/2007:09:36:43 -0600] write_file: 9 file=11
D [27/Jun/2007:09:36:43 -0600] cupsdCloseClient: 9

This is great, apparently cygnus knows that it needs to
get /printers/Samsung.ppd from altair, and this works just fine.

Now trying to get the options for the Laser class, running the command
'lpoptions -p Laser -l' on cygnus:

Cygnus's error_log:

D [27/Jun/2007:09:40:41 -0400] cupsdAcceptClient: 8 from localhost (Domain)
D [27/Jun/2007:09:40:41 -0400] cupsdReadClient: 8 POST / HTTP/1.1
D [27/Jun/2007:09:40:41 -0400] cupsdAuthorize: No authentication data provided.
D [27/Jun/2007:09:40:41 -0400] CUPS-Get-Printers
D [27/Jun/2007:09:40:41 -0400] cupsdProcessIPPRequest: 8 status_code=0 (successful-ok)
D [27/Jun/2007:09:40:41 -0400] cupsdReadClient: 8 POST / HTTP/1.1
D [27/Jun/2007:09:40:41 -0400] cupsdAuthorize: No authentication data provided.
D [27/Jun/2007:09:40:41 -0400] CUPS-Get-Classes
D [27/Jun/2007:09:40:41 -0400] cupsdProcessIPPRequest: 8 status_code=0 (successful-ok)
D [27/Jun/2007:09:40:41 -0400] cupsdReadClient: 8 POST / HTTP/1.1
D [27/Jun/2007:09:40:41 -0400] cupsdAuthorize: No authentication data provided.
D [27/Jun/2007:09:40:41 -0400] CUPS-Get-Default
D [27/Jun/2007:09:40:41 -0400] cupsdProcessIPPRequest: 8 status_code=0 (successful-ok)
D [27/Jun/2007:09:40:41 -0400] cupsdCloseClient: 8
D [27/Jun/2007:09:40:41 -0400] cupsdAcceptClient: 8 from localhost (Domain)
D [27/Jun/2007:09:40:41 -0400] cupsdReadClient: 8 POST / HTTP/1.1
D [27/Jun/2007:09:40:41 -0400] cupsdAuthorize: No authentication data provided.
D [27/Jun/2007:09:40:41 -0400] Get-Printer-Attributes ipp://localhost/printers/Laser
D [27/Jun/2007:09:40:41 -0400] cupsdProcessIPPRequest: 8 status_code=0 (successful-ok)
D [27/Jun/2007:09:40:43 -0400] cupsdCloseClient: 8

Altair's error_log. I have snipped out all the [CGI] lines that pollute
the output here, since apparently this request triggers the web
interface code.  I can provide the entire crazy output if it would be
of use to someone in helping me out:

D [27/Jun/2007:09:41:48 -0600] cupsdAcceptClient: 9 from 172.16.0.7:631 (IPv4)
D [27/Jun/2007:09:41:48 -0600] cupsdReadClient: 9 GET /classes/Laser.ppd HTTP/1.1
D [27/Jun/2007:09:41:48 -0600] cupsdAuthorize: No authentication data provided.
I [27/Jun/2007:09:41:48 -0600] commptr=""
D [27/Jun/2007:09:41:48 -0600] CGI /usr/libexec/cups/cgi-bin/classes.cgi started - PID = 14036
I [27/Jun/2007:09:41:48 -0600] Started "/usr/libexec/cups/cgi-bin/classes.cgi" (pid=14036)
D [27/Jun/2007:09:41:48 -0600] cupsdSendCommand: 9 file=11
D [27/Jun/2007:09:41:48 -0600] cupsdAcceptClient: 12 from localhost (Domain)
D [27/Jun/2007:09:41:48 -0600] cupsdReadClient: 12 POST / HTTP/1.1
D [27/Jun/2007:09:41:48 -0600] cupsdAuthorize: No authentication data provided.
D [27/Jun/2007:09:41:48 -0600] CUPS-Get-Default
D [27/Jun/2007:09:41:48 -0600] cupsdProcessIPPRequest: 12 status_code=0 (successful-ok)
D [27/Jun/2007:09:41:49 -0600] cupsdReadClient: 12 POST / HTTP/1.1
D [27/Jun/2007:09:41:49 -0600] cupsdAuthorize: No authentication data provided.
D [27/Jun/2007:09:41:49 -0600] Get-Printer-Attributes ipp://localhost/classes/Laser.ppd
D [27/Jun/2007:09:41:49 -0600] Get-Printer-Attributes client-error-not-found: The printer or class was not found.
D [27/Jun/2007:09:41:49 -0600] cupsdProcessIPPRequest: 12 status_code=406 (client-error-not-found)
D [27/Jun/2007:09:41:49 -0600] cupsdReadClient: 12 POST / HTTP/1.1
D [27/Jun/2007:09:41:49 -0600] cupsdAuthorize: No authentication data provided.
D [27/Jun/2007:09:41:49 -0600] Get-Jobs ipp://localhost:631/printers/Laser.ppd
D [27/Jun/2007:09:41:49 -0600] Get-Jobs client-error-not-found: The printer or class was not found.
D [27/Jun/2007:09:41:49 -0600] cupsdProcessIPPRequest: 12 status_code=406 (client-error-not-found)
D [27/Jun/2007:09:41:49 -0600] PID 14036 (/usr/libexec/cups/cgi-bin/classes..cgi) exited with no errors.
D [27/Jun/2007:09:41:49 -0600] cupsdCloseClient: 12
D [27/Jun/2007:09:41:49 -0600] cupsdCloseClient: 9

For further reference, here is the error_log on altair when I do
'lpoptions -p Laser -l' locally on that server (which succeeds):

D [27/Jun/2007:09:44:38 -0600] cupsdAcceptClient: 9 from localhost (Domain)
D [27/Jun/2007:09:44:38 -0600] cupsdReadClient: 9 POST / HTTP/1.1
D [27/Jun/2007:09:44:38 -0600] cupsdAuthorize: No authentication data provided.
D [27/Jun/2007:09:44:38 -0600] CUPS-Get-Printers
D [27/Jun/2007:09:44:38 -0600] cupsdProcessIPPRequest: 9 status_code=0 (successful-ok)
D [27/Jun/2007:09:44:38 -0600] cupsdReadClient: 9 POST / HTTP/1.1
D [27/Jun/2007:09:44:38 -0600] cupsdAuthorize: No authentication data provided.
D [27/Jun/2007:09:44:38 -0600] CUPS-Get-Classes
D [27/Jun/2007:09:44:38 -0600] cupsdProcessIPPRequest: 9 status_code=0 (successful-ok)
D [27/Jun/2007:09:44:38 -0600] cupsdReadClient: 9 POST / HTTP/1.1
D [27/Jun/2007:09:44:38 -0600] cupsdAuthorize: No authentication data provided.
D [27/Jun/2007:09:44:38 -0600] CUPS-Get-Default
D [27/Jun/2007:09:44:38 -0600] cupsdProcessIPPRequest: 9 status_code=0 (successful-ok)
D [27/Jun/2007:09:44:38 -0600] cupsdCloseClient: 9
D [27/Jun/2007:09:44:38 -0600] cupsdAcceptClient: 9 from localhost (Domain)
D [27/Jun/2007:09:44:38 -0600] cupsdReadClient: 9 POST / HTTP/1.1
D [27/Jun/2007:09:44:38 -0600] cupsdAuthorize: No authentication data provided.
D [27/Jun/2007:09:44:38 -0600] Get-Printer-Attributes ipp://localhost/printers/Laser
D [27/Jun/2007:09:44:38 -0600] cupsdProcessIPPRequest: 9 status_code=0 (successful-ok)
D [27/Jun/2007:09:44:38 -0600] cupsdReadClient: 9 GET /printers/Samsung.ppd HTTP/1.1
D [27/Jun/2007:09:44:38 -0600] cupsdAuthorize: No authentication data provided.
D [27/Jun/2007:09:44:38 -0600] write_file: 9 file=11
D [27/Jun/2007:09:44:38 -0600] cupsdCloseClient: 9

Note that in the Remote case there is a line in altair's log that says:

  Get-Printer-Attributes ipp://localhost/classes/Laser.ppd
  (which fails)

Whereas the equivalent line in the Local case seems to be:

  Get-Printer-Attributes ipp://localhost/printers/Laser
  (which succeeds, though this is a bit odd since Laser is a class,
   not a printer)

So, this looks to me as if the request for /classes/Laser.ppd is being
mis-translated by altair.  Or perhaps cygnus should be asking
for /printers/Laser.ppd instead.  Is there something I'm doing wrong
here (or have mis-configured)?  Or is this actually a bug?

-- 
Jim Ramsay
"Me fail English?  That's unpossible!"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.cups.org/pipermail/cups/attachments/20070627/8933a605/attachment.bin>


More information about the cups mailing list