[cups.general] Jobs going to Stopped - Cups Restart the Only Resort

Michael Sweet msweet at apple.com
Thu Nov 4 12:37:32 PDT 2010


The lpoptions command does not show the current state of the printer-op-policy or printer-error-policy.

The cupsd.conf file does not contain the printer definitions - you want to look at printers.conf (however, keep in mind that cupsd will delay writing to printers.conf to minimize disk activity...)

On Nov 4, 2010, at 9:52 AM, Anurag Chourasia wrote:

> Hi Mike,
> 
> When we use this command, the printer options are remaining the same as before. Please see the transcript below. I ran the command but the error policy is not appearing in the lpoptions output. Even the cupsd.conf remain untouched. Are we missing something here?
> 
> [root at L573P] / :\>./usr/sbin/lpadmin -p SOCKET -o printer-error-policy=retry-job
> 
> [root at L573P] / :\>lpoptions -p SOCKET
> finishings=3 copies=1 job-hold-until=no-hold job-priority=50 number-up=1 auth-info-required=none job-sheets=none,none printer-info=Socket printer-is-accepting-jobs=1 printer-is-shared=1 printer-location=Socket printer-make-and-model='Local Raw Printer' printer-state=3 printer-state-change-time=1288886176 printer-state-reasons=none printer-type=4
> 
> Regards,
> Anurag
> 
> On Thu, Nov 4, 2010 at 11:57 AM, Michael Sweet <msweet at apple.com> wrote:
> On Nov 3, 2010, at 10:33 PM, Anurag Chourasia wrote:
>> Hi Mike,
>> 
>> Thanks for the response.
>> 
>> There is a "ErrorPolicy" variable. Do you think I could use that to overcome this situation? Basically asking the printer to retry the job instead of stopping?
> 
> Yes, you can use the retry-job or retry-current-job (in recent versions of CUPS) to have the scheduler (cupsd) retry the job.  Use the "lpadmin" command to set the printer-error-policy option ("lpadmin -p name -o printer-error-policy=retry-current-job").
> 
>> What is not clear to me is whether the printer will retry the job once or as many times until the job succeeds?
> 
> The limits are controlled by the JobRetryLimit and JobRetryInterval directives in cupsd.conf. The defaults are 5 and 30, respectively. Use the "cupsctl" command to change them ("cupsctl JobRetryLimit=999 JobRetryInterval=5").
> 
>> http://www.cups.org/documentation.php/doc-1.4/ref-printers-conf.html has more on this Variable.
>> 
>> Regards,
>> Anurag
>> 
>> On Thu, Nov 4, 2010 at 9:48 AM, Michael Sweet <msweet at apple.com> wrote:
>> On Nov 3, 2010, at 9:09 PM, Anurag Chourasia wrote:
>>> Hi Mike,
>>> 
>>> This is a Zebra printer. Zebra earlier indicated that IPP is not supported.
>>> 
>>> Earlier we tried to use Socket but ran into even more serious issues. With Socket Protocol, out of every 10 label requests submitted all the jobs go to successful status but only 1 or 2 labels actually used to come out of the printer.
>>> 
>>> Is there anything else we could try to make lpd behave better in this scenario? Please guide.
>> 
>> Unfortunately, the issue you are running into is that the printer is either not sending its response packet (that tells us the job was submitted successfully) or the packet is getting lost on the network and the printer isn't re-sending the packet when it doesn't get an ack from the CUPS system. If socket isn't working, my guess is either a problem with the printer's network interface or your network in general.
>> 
>> It would be useful for you to run Wireshark on the CUPS system to monitor the LPD traffic between the system and printer. You can also hook up a hardware network analyzer to see what kind of packet loss/error rate you have. (Many routers also provide this information...)
>> 
>>> 
>>> Regards,
>>> Anurag
>>> 
>>> On Thu, Nov 4, 2010 at 9:28 AM, Michael Sweet <msweet at apple.com> wrote:
>>> LPD is not a reliable protocol. If the printer in question supports IPP or socket printing, use that instead.
>>> 
>>> On Nov 3, 2010, at 8:01 PM, Anurag wrote:
>>> 
>>> > Dear Cups Team,
>>> >
>>> > We are facing a problem whereby the label printer stops printing when multiple print requests are received in a short span of time.
>>> >
>>> > In my tests, i sent around 80 Labels to print to the printer within a span of 20 seconds. This volume is pretty low for the Warehouse Operations and it is important that the printing works without any problems in such a scenario. Any help in this regard would be highly appreciated.
>>> >
>>> > In my tests, the job number 7357 was the one that got stuck. All other jobs following the job 7357 went to pending status.
>>> >
>>> > After waiting on job 7357, the printer finally decided to Stop the job and the job went to Stopped status. At this stage, the printer status is shown as "/usr/lib/cups/backend/lpd Failed". The only way to print the remaining labels is to restart the printer again.
>>> >
>>> > I have uploaded the complete error_log at http://pastebin.com/2i7V7SZ7
>>> >
>>> > Here are some of the lines from the error_log that are relevant to job 7357, It seems to have failed exactly after 5 minutes of job submission.
>>> >
>>> > I [03/Nov/2010:23:06:58 -0300] [Job 7357] Adding start banner page "none".
>>> > D [03/Nov/2010:23:06:58 -0300] Discarding unused job-created event...
>>> > I [03/Nov/2010:23:06:58 -0300] [Job 7357] Adding job file of type text/plain.
>>> > I [03/Nov/2010:23:06:58 -0300] [Job 7357] Adding end banner page "none".
>>> > I [03/Nov/2010:23:06:58 -0300] [Job 7357] Queued on "concepcion_115" by "lgfadm".
>>> > D [03/Nov/2010:23:06:58 -0300] [Job 7357] hold_until = 0
>>> > D [03/Nov/2010:23:06:58 -0300] cupsdProcessIPPRequest: 13 status_code=0 (successful-ok)
>>> > D [03/Nov/2010:23:06:58 -0300] cupsdCloseClient: 13
>>> > D [03/Nov/2010:23:06:59 -0300] cupsdAcceptClient: skipping getpeercon()
>>> > D [03/Nov/2010:23:06:59 -0300] cupsdAcceptClient: 13 from localhost (Domain)
>>> > D [03/Nov/2010:23:06:59 -0300] [Job 7352] Unloading...
>>> > D [03/Nov/2010:23:06:59 -0300] [Job 7353] Unloading...
>>> > D [03/Nov/2010:23:06:59 -0300] [Job 7354] Unloading...
>>> > D [03/Nov/2010:23:06:59 -0300] [Job 7355] Unloading...
>>> > D [03/Nov/2010:23:06:59 -0300] cupsdReadClient: 13 POST / HTTP/1.1
>>> > .
>>> > .
>>> > .
>>> > D [03/Nov/2010:23:07:01 -0300] Discarding unused printer-state-changed event...
>>> > D [03/Nov/2010:23:07:01 -0300] Discarding unused printer-state-changed event...
>>> > D [03/Nov/2010:23:07:01 -0300] [Job 7357] Connected to 10.8.25.115:515 (IPv4) (local port 994)...
>>> > D [03/Nov/2010:23:07:01 -0300] [Job 7357] lpd_command 02 lp-cd-esp-115-P1
>>> > D [03/Nov/2010:23:07:01 -0300] [Job 7357] Sending command string (18 bytes)...
>>> > D [03/Nov/2010:23:07:01 -0300] [Job 7357] Reading command status...
>>> > .
>>> > .
>>> > .
>>> > W [03/Nov/2010:23:12:01 -0300] [Job 7357] Remote host did not respond with command status byte after 300 seconds!
>>> > D [03/Nov/2010:23:12:01 -0300] Discarding unused printer-state-changed event...
>>> > D [03/Nov/2010:23:12:01 -0300] [Job 7357] lpd_command returning 4
>>> > E [03/Nov/2010:23:12:01 -0300] PID 19148 (/usr/lib/cups/backend/lpd) stopped with status 1!
>>> > D [03/Nov/2010:23:12:01 -0300] [Job 7357] File 0 is complete.
>>> > I [03/Nov/2010:23:12:01 -0300] [Job 7357] Backend returned status 1 (failed)
>>> > D [03/Nov/2010:23:12:01 -0300] Discarding unused printer-state-changed event...
>>> > D [03/Nov/2010:23:12:01 -0300] Discarding unused printer-stopped event...
>>> > I [03/Nov/2010:23:12:01 -0300] Saving printers.conf...
>>> > D [03/Nov/2010:23:12:01 -0300] Discarding unused job-stopped event...
>>> > D [03/Nov/2010:23:12:02 -0300] [Job 7357] Unloading...
>>> > D [03/Nov/2010:23:12:02 -0300] Report: clients=1
>>> > D [03/Nov/2010:23:12:02 -0300] Report: jobs=196
>>> >
>>> >
>>> > The last line in page_log is as follows
>>> >       concepcion_115 lgfadm 7357 [03/Nov/2010:23:07:01 -0300] 1 1 - localhost
>>> >
>>> > The printer is using lpd as indicated below and also shown are the printer options
>>> >       device for concepcion_115: lpd://10.8.25.115/lp-cd-esp-115-P1
>>> >
>>> > [lgfadm at L573P] /home/lgfadm :\>lpoptions -pconcepcion_115
>>> > finishings=3 copies=1 job-hold-until=no-hold job-priority=50 number-up=1 auth-info-required=none job-sheets=none,none printer-info='Concepcion 115' printer-is-accepting-jobs=1 printer-is-shared=1 printer-location=Concepcion printer-make-and-model='Local Raw Printer' printer-state=5 printer-state-change-time=1288836721 printer-state-reasons=paused printer-type=4
>>> >
>>> > Please guide.
>>> >
>>> > Regards,
>>> > Anurag
>>> > _______________________________________________
>>> > cups mailing list
>>> > cups at easysw.com
>>> > http://lists.easysw.com/mailman/listinfo/cups
>>> 
>>> ________________________________________________________________________
>>> Michael Sweet, Senior Printing System Engineer, PWG Chair
>>> 
>>> _______________________________________________
>>> cups mailing list
>>> cups at easysw.com
>>> http://lists.easysw.com/mailman/listinfo/cups
>>> 
>>> _______________________________________________
>>> cups mailing list
>>> cups at easysw.com
>>> http://lists.easysw.com/mailman/listinfo/cups
>> 
>> ________________________________________________________________________
>> Michael Sweet, Senior Printing System Engineer, PWG Chair
>> 
>> 
>> _______________________________________________
>> cups mailing list
>> cups at easysw.com
>> http://lists.easysw.com/mailman/listinfo/cups
>> 
>> 
>> _______________________________________________
>> cups mailing list
>> cups at easysw.com
>> http://lists.easysw.com/mailman/listinfo/cups
> 
> ________________________________________________________________________
> Michael Sweet, Senior Printing System Engineer, PWG Chair
> 
> 
> _______________________________________________
> cups mailing list
> cups at easysw.com
> http://lists.easysw.com/mailman/listinfo/cups
> 
> 
> _______________________________________________
> cups mailing list
> cups at easysw.com
> http://lists.easysw.com/mailman/listinfo/cups

________________________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cups.org/pipermail/cups/attachments/20101104/0974fc07/attachment-0001.html>


More information about the cups mailing list