Bug 854989 - Error "Unable to add document to print job" on network printer
Error "Unable to add document to print job" on network printer
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: cups (Show other bugs)
17
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tim Waugh
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-06 09:05 EDT by Timothy Murphy
Modified: 2012-11-18 21:21 EST (History)
3 users (show)

See Also:
Fixed In Version: cups-1.5.4-3.fc17
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-18 21:21:40 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Relevant part of /var/log/cups/error_log (355 bytes, text/plain)
2012-09-06 09:05 EDT, Timothy Murphy
no flags Details
troubleshoot.txt (106.36 KB, text/plain)
2012-09-07 06:23 EDT, Timothy Murphy
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
CUPS Bugs and Features 4079 None None None 2012-09-18 05:33:53 EDT

  None (edit)
Description Timothy Murphy 2012-09-06 09:05:13 EDT
Created attachment 610309 [details]
Relevant part of /var/log/cups/error_log

Description of problem: "Unable to add document to print job" in /var/log/cups/error_log


Version-Release number of selected component (if applicable):
cups-1.5.4-2.fc17.i686

How reproducible:
Always

Steps to Reproduce:
1.
Go to CUPS web-page (localhost:631),
Choose Administration=>Manage Printers
2.
Choose printer queue "clp325"
3.
Click on Maintenance=>Print Test Page
  
Actual results:
Nothing is printed.
Show completed jobs says:
-------------------------
 	completed at
Thu 06 Sep 2012 01:56:33 PM IST 
"Unable to add document to print job."
-------------------------

Expected results:
Test page printed

Additional info:
Comment 1 Jiri Popelka 2012-09-06 09:21:33 EDT
Probably bug #827402.
Could you attach a longer part of the error_log ?
Comment 2 Timothy Murphy 2012-09-06 19:38:36 EDT
The entry in /var/log/cups/error_log was just 3 lines long:
Here are the last 6 lines in the error_log
covering the last two times I ran the Print Test Page command.
-----------------------------------
E [06/Sep/2012:21:27:51 +0100] [Job 43] Unable to add document to print job.
W [06/Sep/2012:21:27:51 +0100] failed to CreateProfile: org.freedesktop.ColorManager.AlreadyExists:profile id 'clp325-Gray..' already exists
W [06/Sep/2012:21:27:51 +0100] failed to CreateDevice: org.freedesktop.ColorManager.AlreadyExists:device id 'cups-clp325' already exists
E [07/Sep/2012:00:30:14 +0100] [Job 44] Unable to add document to print job.
W [07/Sep/2012:00:30:14 +0100] failed to CreateProfile: org.freedesktop.ColorManager.AlreadyExists:profile id 'clp325-Gray..' already exists
W [07/Sep/2012:00:30:14 +0100] failed to CreateDevice: org.freedesktop.ColorManager.AlreadyExists:device id 'cups-clp325' already exists
-----------------------------------
Comment 3 Jiri Popelka 2012-09-07 04:07:33 EDT
> The entry in /var/log/cups/error_log was just 3 lines long:

We need the log level to be at least debug.
Please attach an output from printing troubleshooter (that's the easiest and most useful way):
http://fedoraproject.org/wiki/How_to_debug_printing_problems#Printing_troubleshooter
Comment 4 Timothy Murphy 2012-09-07 06:23:30 EDT
Created attachment 610683 [details]
troubleshoot.txt
Comment 5 Timothy Murphy 2012-09-07 08:24:17 EDT
Apologies. I omitted to thank Jiri Popelka for his advice (Comment 3) when adding troubleshoot.txt as an attachment.
The Printing_troubleshooter seemed extremely well designed to me,
and hopefully will enable an expert to see at once where the problem lies.
I should perhaps have added that the printer is working if I choose the JetDirect/AppSocket protocol (with a different queue name), though at present it is not printing in colour; this is with the foo2qpdl driver.
Finally, I should perhaps have mentioned that the printer was working perfectly until fairly recently. (I was out of the country for one month, so am not sure when the failure first occurred.)
Also I have the same problem on another Fedora-17/KDE laptop.
On the other hand the printer works fine under Windows 7 on the same 2 laptops.
Comment 6 Tim Waugh 2012-09-10 11:28:43 EDT
Just to confirm: this printer is connected directly to the network?

It seems that the printer does not correctly support IPP at the level it claims to.

As a work-around you could try using a different protocol for sending jobs, e.g. JetDirect or LPD.
Comment 7 Timothy Murphy 2012-09-10 17:21:13 EDT
The printer is connected (by ethernet) to a Linksys WRT54GL router on my home LAN. The Fedora-17/KDE laptop in question links to this router by WiFi.

As I mentioned, the printer does work if I use the JetDirect/AppSocket protocol.

I've also found that it works perfectly from the CentOS-6.3 server on the LAN, using the foo2qpdl driver. In practice this is what I am using now.

Note that the printer did work under CUPS until recently. So if there is a problem with IPP (which certainly seems to be the case) it must presumably be due to a change in CUPS.
Comment 8 Tim Waugh 2012-09-11 04:15:46 EDT
(In reply to comment #7)
> Note that the printer did work under CUPS until recently. So if there is a
> problem with IPP (which certainly seems to be the case) it must presumably
> be due to a change in CUPS.

It isn't as simple as that. Yes, CUPS has changed the specifics of the way it uses IPP, but the printer is not behaving correctly.  CUPS used to use the Print-Job command to send a print job file, but now uses Create-Job first to create the job, then Send-Document to send each job file.

While supporting Create-Job/Send-Document is optional, if you support one you must support the other.  The printer's Send-Document implementation seems to be behaving incorrectly.

CUPS will fall back to using Print-Job if Create-Job is not supported by the printer; but in this case, it is supported.
Comment 9 Timothy Murphy 2012-09-11 08:06:02 EDT
You say my printer (Samsung CLP-325W) is not behaving correctly, but when I google for "cups Unable to add document to print job" I see many reports of what seems like the same problem with several different printers.

Is there any way for the user (me) to specify that I would like CUPS to use Print_Job rather than Create_Job?

What is the advantage(s) of the new method adopted by CUPS?
Do they outweigh the fact that CUPS does not work now with various printers?
Comment 10 Tim Waugh 2012-09-18 05:16:45 EDT
We could probably add an option to fall back to Print-Job.
Comment 11 Timothy Murphy 2012-09-18 05:51:38 EDT
(In reply to comment #10)
> We could probably add an option to fall back to Print-Job.

That would certainly seem reasonable.
Otherwise it would seem that most if not all Samsung printers, as well as some other printers, are excluded from using the http or ipp protocols.
Comment 12 Tim Waugh 2012-09-18 08:18:37 EDT
Wow... from the upstream bug report:

"Sorry, we have decided this issue will not be addressed in a CUPS release.

Since this printer supports app socket and since any change we make will just make the IPP backend that much more complicated to maintain, closing as not-to-be-fixed. Sorry."

Meanwhile, here's a build that should fix it in Fedora 17:
  https://koji.fedoraproject.org/koji/buildinfo?buildID=354948
Comment 13 Fedora Update System 2012-09-19 06:37:06 EDT
cups-1.5.4-3.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/cups-1.5.4-3.fc17
Comment 14 Fedora Update System 2012-09-19 06:39:07 EDT
cups-1.5.4-5.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/cups-1.5.4-5.fc18
Comment 15 Fedora Update System 2012-09-20 02:00:08 EDT
Package cups-1.5.4-5.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing cups-1.5.4-5.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-14411/cups-1.5.4-5.fc18
then log in and leave karma (feedback).
Comment 16 Timothy Murphy 2012-10-01 09:12:25 EDT
Thanks very much.
After
 su -c 'yum --enablerepo=updates-testing update cups cups-libs'
cups-1.5.4-3.fc17.i686 was installed,
and this seems to work fine.
I'm now offered CLP-325 in the list of printers.
I'm also offered a choice between colour and monochrome, 
which I hadn't noticed before.
Comment 17 Fedora Update System 2012-11-18 21:21:42 EST
cups-1.5.4-11.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.