Printing problem on 9.04 server

Asked by GillesGermon

We have a customer who prints every month its customers invoices.
That's thousands of pages.
The operator launches printing in the evening and it is expected to last up until there is no more sheet of paper in the printer.
The next morning, the operator puts paper into the printer and so on.
With its previous server he had to "enable" the printer and the printing process continued.
Now the job simply disappears if the ErrorPolicy in /etc/cups/printers.conf is set to retry-job.
I replace retry-job by stop-printer and add also Timeout=600 in /etc/cups/cupsd.conf.
Now in the morning, the printer is diabled, but a cupsenable printer or sudo cupsenable printer results in a message in /var/log/cups/error_log : Resume-Printer : Not Authorized, and the job never resume, the operator needs to launch the printing process again from where the printer stops to print. Not really nice.
The printer is a raw network matrix printer defined with:
# sudo lpadmin -p implp -v lpd://tally/implp -E
What are the good parameters (in cupsd.conf I presume) to have the printing process resume correctly?
TIA
Gilles

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu cups Edit question
Assignee:
No assignee Edit question
Solved by:
GillesGermon
Solved:
Last query:
Last reply:
Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#1

Please try to add the user to lpadmin group, using terminal type:

sudo adduser the_user_name lpadmin

substitute "the_user_name" with real user name

Hth

Revision history for this message
GillesGermon (ggermon) said :
#2

Hi Marco
Thank you for your attention

This doesn't works:
$who am i
linux pts/11 ......
$groups
linux adm dialout cdrom tape plugdev lpadmin sambashare admin
$sudo adduser linux lpadmin
The user "linux" is already a member of "lpadmin"

The "cupsenable implp" command always results in Resume-Printer: Unauthorized in /var/log/cups/error_log

Other ideas?
Regards

Revision history for this message
GillesGermon (ggermon) said :
#3

Follow-up:
In fact when I issue the cupsenable implp command, the printer is no more disabled, but the job doesn't resume.

Before cupsenable:
$lpstat -t|grep implp
device for implp: lpd://tally/implp
implp accepting requests since .....
printer implp is disabled since .....
implp-289508 root 22575417 ...........

After cupsenable:
$lpstat -t|grep implp
device for implp: lpd://tally/implp
implp accepting requests since .....
printer implp is doing nothing; it is enabled since ..........
implp-289508 root 22575417 ...........

I have modified cupsd.conf from LogLevel warning to LogLevel debug
This is the timeout:
D [22/Dec/2009:14:17:31 +0100] [Job 289525] Unloading...
W [22/Dec/2009:14:17:42 +0100] [Job 289508] the remote host  did not respond with a state byte after 300 seconds.(in french)
D [22/Dec/2009:14:17:42 +0100] [Job 289508] lpd_command returning 4
D [22/Dec/2009:14:17:42 +0100] Discarding unused printer-state-changed event...
E [22/Dec/2009:14:17:42 +0100] PID 29136 (/usr/lib/cups/backend/lpd) stopped with status 1!
D [22/Dec/2009:14:17:42 +0100] [Job 289508] File 0 is complete.
I [22/Dec/2009:14:17:42 +0100] [Job 289508] Backend returned status 1 (failed)
D [22/Dec/2009:14:17:42 +0100] Discarding unused printer-state-changed event...
D [22/Dec/2009:14:17:42 +0100] Discarding unused printer-stopped event...
I [22/Dec/2009:14:17:42 +0100] Saving printers.conf...
D [22/Dec/2009:14:17:42 +0100] Discarding unused job-stopped event...
D [22/Dec/2009:14:17:42 +0100] cupsdAcceptClient: 11 from localhost (Domain)
D [22/Dec/2009:14:17:42 +0100] cupsdReadClient: 11 POST / HTTP/1.1
D [22/Dec/2009:14:17:42 +0100] cupsdAuthorize: No authentication data provided.
D [22/Dec/2009:14:17:42 +0100] Get-Jobs ipp://localhost/printers/
D [22/Dec/2009:14:17:42 +0100] cupsdProcessIPPRequest: 11 status_code=0 (successful-ok)
D [22/Dec/2009:14:17:42 +0100] cupsdCloseClient: 11
D [22/Dec/2009:14:17:43 +0100] [Job 289508] Unloading...

When the cupsenable command is run I found this in error_log:
D [22/Dec/2009:14:33:01 +0100] Resume-Printer ipp://localhost/printers/implp
D [22/Dec/2009:14:33:01 +0100] cupsdIsAuthorized: username=""
E [22/Dec/2009:14:33:01 +0100] Resume-Printer: Unauthorized
D [22/Dec/2009:14:33:01 +0100] cupsdSendError: 11 code=401 (Unauthorized)
D [22/Dec/2009:14:33:01 +0100] cupsdSendHeader: WWW-Authenticate: Basic realm="CUPS"
D [22/Dec/2009:14:33:01 +0100] cupsdCloseClient: 11
D [22/Dec/2009:14:33:01 +0100] cupsdAcceptClient: 11 from localhost (Domain)
D [22/Dec/2009:14:33:01 +0100] cupsdReadClient: 11 POST /admin/ HTTP/1.1
D [22/Dec/2009:14:33:01 +0100] cupsdAuthorize: Authorized as root using Local
D [22/Dec/2009:14:33:01 +0100] Resume-Printer ipp://localhost/printers/implp
D [22/Dec/2009:14:33:01 +0100] cupsdIsAuthorized: username="root"
D [22/Dec/2009:14:33:01 +0100] Discarding unused printer-state-changed event...
I [22/Dec/2009:14:33:01 +0100] Saving printers.conf...
I [22/Dec/2009:14:33:01 +0100] Printer "implp" started by "root".

So, the printer seems to be started by root, but I found these lines in error_log which appears regularly until the job is canceled:
D [22/Dec/2009:14:19:00 +0100] Get-Jobs ipp://localhost/printers/
D [22/Dec/2009:14:19:00 +0100] [Job 289508] Loading attributes...

D [22/Dec/2009:14:20:31 +0100] [Job 289508] Unloading...

D [22/Dec/2009:14:20:31 +0100] Get-Jobs ipp://localhost/printers/
D [22/Dec/2009:14:20:31 +0100] [Job 289508] Loading attributes...

D [22/Dec/2009:14:21:45 +0100] [Job 289508] Unloading...

And so on.......
The printer is resumed but the job is not queued correctly
Is this a bug?

Revision history for this message
GillesGermon (ggermon) said :
#4

Another info:

for all the printers (34) the lpstat -t always return

printer impXYZ is printing impXYZ-0; it is enabled since ..........

The -0 (zero) is suspect, perhaps a path to follow

Revision history for this message
GillesGermon (ggermon) said :
#5

Finally, I resolved this issue with these changes in cupsd.conf:

let the ErrorPolicy to retry-job
Timeout 600
JobRetryLimit 2000000000 (almost infinite retry)
JobRetryInterval 120 (retry every two minutes)