Linux CUPS auto re-add printer

cupslinuxprinterredhat

We have a Redhat machine (2.6.9-42.ELsmp) that runs CUPS. Once in a while, people send big files to the printer, and it gets stuck, so they restart the printer. After 300 seconds of it not responding, the printer becomes UNavailable. CUPS will then remove the printer from the available printer list, and never tries it again.

Is there anyway I can set it so that CUPS will try to talk to the printer to re-add it to the list whenever the printer is online again?

The way we "solve" this is every time it happens, we manually modify the printers.conf file, change the printer status to "Idle", then restart the service. I'm sure there's a better to do this, no?

Thanks,

Tam.

Best Answer

This should be fixed by changing the ErrorPolicy in cupsd.conf or printers.conf:

CUPS 1.3/Mac OS X 10.5ErrorPolicy

Examples

ErrorPolicy abort-job

ErrorPolicy retry-job

ErrorPolicy stop-printer

Description

The ErrorPolicy directive defines the default policy that is used when a backend is unable to send a print job to the printer. [...]

See: http://www.cups.org/doc-1.4/ref-cupsd-conf.html#ErrorPolicy

The default is:

stop-printer - Stop the printer and keep the job for future printing

however you probably want:

retry-job - Retry the job after waiting for N seconds [...]

(or maybe retry-this-job).

Note: On CUPS V1.4+ it's called FatalErrors.