Solved Filter failed - CUPS - HP PSC 2350 series

Hi,

I have a server under Debian 8 with a HP PSC 2350 series connected on USB port.

For allow printing on the others computers on my network, I shared the printer with a CUPS server.

So, I can print perfectly with my laptop on Debian 8 (detecting, installing and configuring automatically the remote printer via CUPS). Nice !

But with my other laptop on FreeBSD 11.0 x64, nothing works automatically. I have installed and configured the remote printer on my CUPS client. So I can see his status and send document to print. But print a testing page (or any doc) does not work. This error is returned: Filter failed (both on client and server).

I followed this https://www.freebsd.org/doc/en/articles/cups/ to configure my CUPS client on my FreeBSD laptop.

Code:
root@beastie:~ # uname -a
FreeBSD beastie 11.0-RELEASE-p8 FreeBSD 11.0-RELEASE-p8 #0: Wed Feb 22 06:12:04 UTC 2017 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64

Code:
root@beastie:~ # pkg info | grep cups
cups-2.2.2_1
cups-filters-1.11.4_1
gutenprint-cups-5.2.10_3

Code:
root@beastie:~ # pkg info | grep hp
hplip-3.16.11_1

Code:
root@beastie:~ # pkg info | grep gutenprint
gimp-gutenprint-5.2.10_3
gutenprint-5.2.10
gutenprint-base-5.2.10_2
gutenprint-cups-5.2.10_3
gutenprint-ijs-5.2.10_2

What I found on the Debian 8 CUPS server
Code:
root@antares:~/# cat /var/log/cups/error_log
D [20/Mar/2017:22:30:50 +0100] [Job 59] Started filter /usr/lib/cups/filter/hpcups (PID 2680)
D [20/Mar/2017:22:30:50 +0100] [Job 59] Started backend /usr/lib/cups/backend/hp (PID 2681)
D [20/Mar/2017:22:30:50 +0100] [Job 59] prnt/hpcups/HPCupsFilter.cpp 530: cupsRasterOpen failed, fd = 7
D [20/Mar/2017:22:30:50 +0100] [Job 59] prnt/backend/hp.c 902: ERROR: null print job total=0
D [20/Mar/2017:22:30:50 +0100] [Job 59] PID 2680 (/usr/lib/cups/filter/hpcups) stopped with status 1.
D [20/Mar/2017:22:30:50 +0100] [Job 59] Hint: Try setting the LogLevel to "debug" to find out more.
D [20/Mar/2017:22:30:50 +0100] [Job 59] PID 2681 (/usr/lib/cups/backend/hp) exited with no errors.
D [20/Mar/2017:22:30:50 +0100] [Job 59] End of messages
D [20/Mar/2017:22:30:50 +0100] [Job 59] printer-state=3(idle)
D [20/Mar/2017:22:30:50 +0100] [Job 59] printer-state-message="Filter failed"
D [20/Mar/2017:22:30:50 +0100] [Job 59] printer-state-reasons=none

What I found on the FreeBSD 11 laptop
Code:
root@beastie:~ # cat /var/log/cups/error_log
D [20/Mar/2017:22:30:47 +0100] [Job 21] job-id integer 59
D [20/Mar/2017:22:30:47 +0100] [Job 21] requesting-user-name nameWithoutLanguage root
D [20/Mar/2017:22:30:47 +0100] [Job 21] last-document boolean true
D [20/Mar/2017:22:30:47 +0100] [Job 21] document-format mimeMediaType application/vnd.cups-raster
D [20/Mar/2017:22:30:47 +0100] [Job 21] ---- end-of-attributes-tag ----
D [20/Mar/2017:22:30:47 +0100] [Job 21] Filter failed
D [20/Mar/2017:22:30:47 +0100] [Job 21] update_reasons(attr=1(none), s=\"(null)\")
D [20/Mar/2017:22:30:47 +0100] [Job 21] Get-Printer-Attributes: successful-ok (successful-ok)
D [20/Mar/2017:22:30:47 +0100] [Job 21] ---- operation-attributes-tag ----
D [20/Mar/2017:22:30:47 +0100] [Job 21] attributes-charset charset utf-8
D [20/Mar/2017:22:30:47 +0100] [Job 21] attributes-natural-language naturalLanguage fr-fr
D [20/Mar/2017:22:30:47 +0100] [Job 21] ---- printer-attributes-tag ----
D [20/Mar/2017:22:30:47 +0100] [Job 21] printer-is-accepting-jobs boolean true
D [20/Mar/2017:22:30:47 +0100] [Job 21] printer-state enum idle
D [20/Mar/2017:22:30:47 +0100] [Job 21] printer-state-message textWithoutLanguage Filter failed
D [20/Mar/2017:22:30:47 +0100] [Job 21] printer-state-reasons keyword none
D [20/Mar/2017:22:30:47 +0100] [Job 21] document-format-supported 1setOf mimeMediaType application/octet-stream,application/pdf,application/postscript,application/vnd.adobe-reader-postscript,application/vnd.cups-pdf,application/vnd.cups-pdf-banner,application/vnd.cups-postscript,application/vnd.cups-raster,application/vnd.cups-raw,application/x-cshell,application/x-csource,application/x-perl,application/x-shell,image/gif,image/jpeg,image/png,image/pwg-raster,image/tiff,image/urf,image/x-bitmap,image/x-photocd,image/x-portable-anymap,image/x-portable-bitmap,image/x-portable-graymap,image/x-portable-pixmap,image/x-sgi-rgb,image/x-sun-raster,image/x-xbitmap,image/x-xpixmap,image/x-xwindowdump,text/css,text/html,text/plain
D [20/Mar/2017:22:30:47 +0100] [Job 21] print-color-mode-supported 1setOf keyword monochrome,color
D [20/Mar/2017:22:30:47 +0100] [Job 21] compression-supported 1setOf keyword none,gzip
D [20/Mar/2017:22:30:47 +0100] [Job 21] copies-supported rangeOfInteger 1-9999
D [20/Mar/2017:22:30:47 +0100] [Job 21] cups-version textWithoutLanguage 1.7.5

I have a lot of log lines, so if you are brave I can send all the lines.

Seriously it has been 3 days since I look, but I don't see any way to solve this issue.

I tried to replace cups-filters with foomatic, but does not work.

I tried to comment the following line on /usr/local/etc/cups/ppd/PSC-2350-series.ppd
Code:
*cupsFilter: "application/vnd.cups-raster 0 hpcups"

It print but only strange characters...

I'm not a printer engineer, I don't understand what happens. I think the CUPS server was correctly configured, I can print perfectly on my Debian 8 laptop.

So, I'm out of ideas. If anyone have one...
 
I think the problem comes from running your output through the filter twice. The solution is either to initially send it "raw" so it is filtered only the the Debian server or edit the ppd on the first machine. See this Thread 53725.

Edit: I see you tried editing the ppd - Was that with hplip installed or with foomatic-filters?
 
Thanks for your answer.

I tested with hplip and it print, but the layout was bugged.

So I founded on my Debian laptop, on the ppd file, the next line:
Code:
*cupsFilter: "*/* 0 -"

I replaced the same line on my FreeBSD laptop:
Code:
*cupsFilter: "application/vnd.cups-raster 0 hpcups"
by
Code:
*cupsFilter: "*/* 0 -"

Now all work. Nice!

But:
- Why this work?
- This is not documented anywhere on FreeBSD documentation?
 
But:
- Why this work?
- This is not documented anywhere on FreeBSD documentation?
.

There are several reasons it is not documented in the FreeBSD handbook. 1) It is an upstream cups issue that first surfaced in Redhat/Fedora. 2) FreeBSD maintains the older lpr printing system that is robustly simple. The FreeBSD handbook addresses that system. 3) There is a 3rd party FreeBSD cups guide put together by a volunteer: FreeBSD cups introduction.
 
Back
Top