cups returns generic "Print file was not accepted" error, file does not print

1

I'm unable to print any file (txt, pdf, ect) using cups on EL7.

The job appears to be accepted, but setting cups loglevel to debug I am seeing the following:

D [01/May/2017:10:36:52 -0400] cupsdSetBusyState: newbusy="Dirty files", busy="Dirty files"
D [01/May/2017:10:36:52 -0400] [Job 18] Looking up "1.2.3.4"...
D [01/May/2017:10:36:52 -0400] Discarding unused printer-state-changed event...
D [01/May/2017:10:36:52 -0400] [Job 18] Connecting to 1.2.3.4:631
I [01/May/2017:10:36:52 -0400] [Job 18] Connecting to printer.
D [01/May/2017:10:36:52 -0400] cupsdMarkDirty(---J-)
D [01/May/2017:10:36:52 -0400] cupsdSetBusyState: newbusy="Dirty files", busy="Dirty files"
D [01/May/2017:10:36:52 -0400] [Job 18] Set job-printer-state-message to "Connecting to printer.", current level=INFO
D [01/May/2017:10:36:52 -0400] Discarding unused job-progress event...
D [01/May/2017:10:36:52 -0400] Discarding unused printer-state-changed event...
D [01/May/2017:10:36:52 -0400] [Job 18] update_reasons(attr=0(), s="-cups-certificate-error")
D [01/May/2017:10:36:52 -0400] [Job 18] update_reasons(attr=0(), s="-connecting-to-device")
D [01/May/2017:10:36:52 -0400] [Job 18] STATE: -connecting-to-device
D [01/May/2017:10:36:52 -0400] cupsdMarkDirty(---J-)
D [01/May/2017:10:36:52 -0400] cupsdSetBusyState: newbusy="Printing jobs and dirty files", busy="Dirty files"
I [01/May/2017:10:36:52 -0400] [Job 18] Connected to printer.
D [01/May/2017:10:36:52 -0400] cupsdMarkDirty(---J-)
D [01/May/2017:10:36:52 -0400] cupsdSetBusyState: newbusy="Printing jobs and dirty files", busy="Printing jobs and dirty files"
D [01/May/2017:10:36:52 -0400] [Job 18] Set job-printer-state-message to "Connected to printer.", current level=INFO
D [01/May/2017:10:36:52 -0400] [Job 18] Connected to 1.2.3.4:631...
D [01/May/2017:10:36:52 -0400] [Job 18] Getting supported attributes...
D [01/May/2017:10:36:52 -0400] Discarding unused job-progress event...
D [01/May/2017:10:36:52 -0400] Discarding unused printer-state-changed event...
D [01/May/2017:10:36:53 -0400] [Job 18] Get-Printer-Attributes: successful-ok (successful-ok)
D [01/May/2017:10:36:53 -0400] [Job 18] copies-supported=1-32000
D [01/May/2017:10:36:53 -0400] [Job 18] document-format-supported (7 values)
D [01/May/2017:10:36:53 -0400] [Job 18] [0] = "text/plain"
D [01/May/2017:10:36:53 -0400] [Job 18] [1] = "application/octet-stream"
D [01/May/2017:10:36:53 -0400] [Job 18] [2] = "application/vnd.hp-PCL"
D [01/May/2017:10:36:53 -0400] [Job 18] [3] = "application/vnd.hp-PCLXL"
D [01/May/2017:10:36:53 -0400] [Job 18] [4] = "application/postscript"
D [01/May/2017:10:36:53 -0400] [Job 18] [5] = "application/pdf"
D [01/May/2017:10:36:53 -0400] [Job 18] [6] = "image/urf"
D [01/May/2017:10:36:53 -0400] [Job 18] media-col-supported (8 values)
D [01/May/2017:10:36:53 -0400] [Job 18] [0] = "media-type"
D [01/May/2017:10:36:53 -0400] [Job 18] [1] = "media-size"
D [01/May/2017:10:36:53 -0400] [Job 18] [2] = "media-top-margin"
D [01/May/2017:10:36:53 -0400] [Job 18] [3] = "media-left-margin"
D [01/May/2017:10:36:53 -0400] [Job 18] [4] = "media-right-margin"
D [01/May/2017:10:36:53 -0400] [Job 18] [5] = "media-bottom-margin"
D [01/May/2017:10:36:53 -0400] [Job 18] [6] = "media-source"
D [01/May/2017:10:36:53 -0400] [Job 18] [7] = "duplex-supported"
D [01/May/2017:10:36:53 -0400] [Job 18] operations-supported (11 values)
D [01/May/2017:10:36:53 -0400] [Job 18] [0] = Print-Job
D [01/May/2017:10:36:53 -0400] [Job 18] [1] = Print-URI
D [01/May/2017:10:36:53 -0400] [Job 18] [2] = Validate-Job
D [01/May/2017:10:36:53 -0400] [Job 18] [3] = Create-Job
D [01/May/2017:10:36:53 -0400] [Job 18] [4] = Send-Document
D [01/May/2017:10:36:53 -0400] [Job 18] [5] = Send-URI
D [01/May/2017:10:36:53 -0400] [Job 18] [6] = 0x003c
D [01/May/2017:10:36:53 -0400] [Job 18] [7] = Cancel-Job
D [01/May/2017:10:36:53 -0400] [Job 18] [8] = Get-Job-Attributes
D [01/May/2017:10:36:53 -0400] [Job 18] [9] = Get-Jobs
D [01/May/2017:10:36:53 -0400] [Job 18] [10] = Get-Printer-Attributes
D [01/May/2017:10:36:53 -0400] [Job 18] update_reasons(attr=1(none), s="(null)")
D [01/May/2017:10:36:53 -0400] [Job 18] STATE: -none
D [01/May/2017:10:36:53 -0400] [Job 18] ATTR: marker-colors='"none"','"#000000"'
D [01/May/2017:10:36:53 -0400] cupsdMarkDirty(P----)
D [01/May/2017:10:36:53 -0400] cupsdSetBusyState: newbusy="Printing jobs and dirty files", busy="Printing jobs and dirty files"
D [01/May/2017:10:36:53 -0400] [Job 18] ATTR: marker-high-levels=100,100
D [01/May/2017:10:36:53 -0400] cupsdMarkDirty(P----)
D [01/May/2017:10:36:53 -0400] cupsdSetBusyState: newbusy="Printing jobs and dirty files", busy="Printing jobs and dirty files"
D [01/May/2017:10:36:53 -0400] [Job 18] ATTR: marker-levels=74,25
D [01/May/2017:10:36:53 -0400] cupsdMarkDirty(P----)
D [01/May/2017:10:36:53 -0400] cupsdSetBusyState: newbusy="Printing jobs and dirty files", busy="Printing jobs and dirty files"
D [01/May/2017:10:36:53 -0400] [Job 18] ATTR: marker-low-levels=2,8
D [01/May/2017:10:36:53 -0400] cupsdMarkDirty(P----)
D [01/May/2017:10:36:53 -0400] cupsdSetBusyState: newbusy="Printing jobs and dirty files", busy="Printing jobs and dirty files"
D [01/May/2017:10:36:53 -0400] [Job 18] ATTR: marker-message='"none"'
D [01/May/2017:10:36:53 -0400] cupsdMarkDirty(P----)
D [01/May/2017:10:36:53 -0400] cupsdSetBusyState: newbusy="Printing jobs and dirty files", busy="Printing jobs and dirty files"
D [01/May/2017:10:36:53 -0400] [Job 18] ATTR: marker-names='"Maintenance Kit"','"Black Cartridge"'
D [01/May/2017:10:36:53 -0400] cupsdMarkDirty(P----)
D [01/May/2017:10:36:53 -0400] cupsdSetBusyState: newbusy="Printing jobs and dirty files", busy="Printing jobs and dirty files"
D [01/May/2017:10:36:53 -0400] [Job 18] ATTR: marker-types='"maintenanceKit"','"tonerCartridge"'
D [01/May/2017:10:36:53 -0400] cupsdMarkDirty(P----)
D [01/May/2017:10:36:53 -0400] cupsdSetBusyState: newbusy="Printing jobs and dirty files", busy="Printing jobs and dirty files"
D [01/May/2017:10:36:53 -0400] [Job 18] final_content_type="application/pdf", document_format="application/pdf"
D [01/May/2017:10:36:53 -0400] [Job 18] Validate-Job IPP/2.0
D [01/May/2017:10:36:53 -0400] [Job 18] printer-uri="ipp://1.2.3.4:631/"
D [01/May/2017:10:36:53 -0400] [Job 18] requesting-user-name="root"
D [01/May/2017:10:36:53 -0400] [Job 18] job-name="flyer.pdf"
D [01/May/2017:10:36:53 -0400] [Job 18] document-format="application/pdf"
D [01/May/2017:10:36:53 -0400] Discarding unused printer-state-changed event...
D [01/May/2017:10:36:53 -0400] [Job 18] Validate-Job: client-error-bad-request (client-error-bad-request)
D [01/May/2017:10:36:53 -0400] [Job 18] Create-Job IPP/2.0
D [01/May/2017:10:36:53 -0400] [Job 18] printer-uri="ipp://1.2.3.4:631/"
D [01/May/2017:10:36:53 -0400] [Job 18] requesting-user-name="root"
D [01/May/2017:10:36:53 -0400] [Job 18] job-name="flyer.pdf"
D [01/May/2017:10:36:53 -0400] [Job 18] update_reasons(attr=1(none), s="(null)")
D [01/May/2017:10:36:53 -0400] [Job 18] Get-Printer-Attributes: successful-ok (successful-ok)
D [01/May/2017:10:36:53 -0400] [Job 18] Create-Job: client-error-bad-request (client-error-bad-request)
E [01/May/2017:10:36:53 -0400] [Job 18] Print file was not accepted.
D [01/May/2017:10:36:53 -0400] cupsdMarkDirty(---J-)
D [01/May/2017:10:36:53 -0400] cupsdSetBusyState: newbusy="Printing jobs and dirty files", busy="Printing jobs and dirty files"
D [01/May/2017:10:36:53 -0400] [Job 18] Set job-printer-state-message to "Print file was not accepted.", current level=ERROR

I temporarily disabled SELinux with no effect.

I cleared the cups printer cache and sent a plain TXT document, with the same error (apart from job name reflecting the other file).

1) Any ideas on what could be causing "Print file was not accepted"?

2) Any way of increasing cups logging verbosity to maybe find out why the file is not accepted?

a coder

Posted 2017-05-01T15:02:29.127

Reputation: 273

No, I obfuscated the printer IP for posting on SU. – a coder – 2017-05-01T15:09:40.680

Answers

0

I found a PPD file for my physical printer and set up a cups printer accordingly:

lpadmin -p printer_office_v2 -E -v ipp://1.2.3.4 -P /etc/cups/ppd/laserjet.ppd

Am now able to print files.

a coder

Posted 2017-05-01T15:02:29.127

Reputation: 273

0

I was fighting for at least two hours with the printer yesterday, one of the first issues I encountered was this one ... "Print file was not accepted". googling did not help (but I did end up here), so I will share my experience and hope others googling will find it ...

I could ping my printer, I could connect with it over http (and got up some management webui console, without any password, but no possibility to print from said console). I also used tcpdump to ensure there were communication between CUPS and the printer - but I didn't understand much of the gibberish. No clear error message anywhere, except the "Print file was not accepted" from CUPS.

After a lot of cursing it occurred to me that the error message "Print file was not accepted" could be due to my computer being at another subnet than my "HP ENVY Photo 6200" printer. I couldn't find any access settings on the printer, but of course it does not accept random print jobs from the Internet.

This can be solved by routing the print job through a computer staying at the same subnet as the printer or by becoming a part of the subnet (i.e. using VPN). I eventually ended up using ssh to carve a tunnel (ssh -L8888:10.0.92.171:631 some-machine-in-subnet, then set up localhost:8888 as the printer URL).

My second problem was that CUPS hadn't been set up with the PPD file, but the error message was differently, "Unable to add document to print job". This one could easily be pinpointed to the missing PPD by checking the CUPS error log. I found the PPD file in the hplip package and installed it through the CUPS web-UI, though the lpadmin command suggested in the answer above should also work.

tobixen

Posted 2017-05-01T15:02:29.127

Reputation: 229