Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

CUPS continues to request "get-job-attributes" rapidly even when response says "server-error-operation-not-supported" #4083

Closed

Description

@michaelrsweet

Version: 1.5.0
CUPS.org User: ulrich.windl.rz.uni-regensburg

I found this issue while testing a IPP printer simulator with CUPS:
CUPS 1.3.9 issues an error "Unable to get job 1 attributes (server-error-operation-not-supported)!" and disables the printer when the IPP server does not implement the "get-job-attributes" operation (Yes, it's the fault in my implementation of the simulator (work in progress)). However CUPS 1.5.0 (as of openSUSE 12.1) continues to issue the "op_id 9" requests rapidly.

Activity

  1. michaelrsweet commented on May 15, 2012

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    Please retest with 1.5.3, which is coming out today. The backend should periodically retry for certain errors but not this one.

    As for not supporting get-job-attributes, I'll add yet another test for it and pause the queue with yet another "your printer is broken" error.

    P2 (barely)

  2. michaelrsweet commented on May 23, 2012

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    Fixed in Subversion repository.

  3. michaelrsweet commented on May 23, 2012

    @michaelrsweet
    ContributorAuthor

    "str4083.patch":

    Index: backend/ipp.c

    --- backend/ipp.c (revision 10499)
    +++ backend/ipp.c (working copy)
    @@ -66,7 +66,8 @@
    resource; / Resource path /
    int port, /
    Port number /
    version, /
    IPP version */

    •       job_id;     /\* Job ID for submitted job */
      
    •       job_id,     /\* Job ID for submitted job */
      
    •       get_job_attrs;  /\* Support Get-Job-Attributes? _/
      

      const char *job_name; /_ Job name for submitted job /
      http_encryption_t encryption; /
      Use encryption? /
      ipp_jstate_t job_state; /
      Current job state /
      @@ -241,6 +242,7 @@
      ipp_attribute_t *printer_state; /
      printer-state attribute /
      ipp_attribute_t *printer_accepting; /
      printer-is-accepting-jobs /
      int create_job = 0, /
      Does printer support Create-Job? */

    •   get_job_attrs = 0,  /\* Does printer support Get-Job-Attributes? _/
      send_document = 0,  /_ Does printer support Send-Document? _/
      validate_job = 0;   /_ Does printer support Validate-Job? _/
      

      int copies, /_ Number of copies for job */
      @@ -1074,6 +1076,8 @@
      create_job = 1;
      else if (operations_sup->values[i].integer == IPP_SEND_DOCUMENT)
      send_document = 1;

    •    else if (operations_sup->values[i].integer == IPP_GET_JOB_ATTRIBUTES)
      
    • get_job_attrs = 1;
      

      }

      if (!send_document)
      @@ -1262,6 +1266,7 @@
      monitor.port = port;
      monitor.version = version;
      monitor.job_id = 0;

    • monitor.get_job_attrs = get_job_attrs;
      monitor.encryption = cupsEncryption();
      monitor.job_state = IPP_JOB_PENDING;
      monitor.printer_state = IPP_PRINTER_IDLE;
      @@ -1661,7 +1666,7 @@

    • Wait for the job to complete...
      */

    • if (!job_id || !waitjob)

    • if (!job_id || !waitjob || !get_job_attrs)
      continue;

    _cupsLangPrintFilter(stderr, "INFO", _("Waiting for job to complete."));
    @@ -2128,7 +2133,8 @@

    • Check the status of the job itself...
      */
    •  job_op  = monitor->job_id > 0 ? IPP_GET_JOB_ATTRIBUTES : IPP_GET_JOBS;
      
    •  job_op  = (monitor->job_id > 0 && monitor->get_job_attrs) ?
      
    •                IPP_GET_JOB_ATTRIBUTES : IPP_GET_JOBS;
      
      request = ippNewRequest(job_op);
      request->request.op.version[0] = monitor->version / 10;
      request->request.op.version[1] = monitor->version % 10;
  4. added this to the Stable milestone on Mar 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions