Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Printing with cups via network fails, works locally
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
tomtom69
Apprentice
Apprentice


Joined: 09 Nov 2010
Posts: 245
Location: Bavaria

PostPosted: Sat Nov 21, 2015 3:31 pm    Post subject: Printing with cups via network fails, works locally Reply with quote

Hi,

I have two (nearly identical) gentoo machines (amd64 stable), one of which is connected to a printer (an old HP Deskjet 710C). I have installed cups, foomatic-db, foomatic-db-ppds and pnm2ppa on both machines.
The machine with the printer connected can print without problems. However the other machine connected via network was able to print about 2 years ago (printing was never needed again since then).
Now (after many updates) I tried to print again, but the machine connected via network can not print anymore. I always get the error "filter failed" in the cups management web page on both machines.

I enabled logging and found out, that remote printing causes an error message of the pdf filter in /var/log/cups/error_log:
[Job 220] Syntax Warning: May not be a PDF file (continuing anyway)
[Job 220] Syntax Error: Couldn't find trailer dictionary
[Job 220] Syntax Error: Couldn't find trailer dictionary
[Job 220] Syntax Error: Couldn't read xref table
[Job 220] The print file is empty.

Cups creates the data files in /var/spool/cups so I examined the data files for identical print tries from local and remote (both using libreoffice with just a new page with the word "test" on it).
I can see that when I print locally, the data file in /var/spool/cups looks like a PDF file, because it starts with "%PDF-1.4".
But when I print via network from the other machine, the file contains only binary data without a PDF header. So it looks reasonable why the error message above regarding PDF errors appears.
To add more confusion, the file created in /var/spool/cups of the machine that cannot print looks OK and also starts with "%PDF-1.4".
So it looks like the file is corrupted when transferred via network from one cups spooler folder to the other's machine cups spooler folder.

What could be the reason why the files sent via network are not correct?

I already tried different printer settings (PDF and different postscript levels) in libreoffice without success.
I also tried to setup the printer again on the networked machine, also without success.
Test page printing has the same behaviour: Works on the machine with the printer connected, doesn't work on the other machine.
Back to top
View user's profile Send private message
cboldt
Veteran
Veteran


Joined: 24 Aug 2005
Posts: 1046

PostPosted: Sat Nov 21, 2015 5:16 pm    Post subject: Reply with quote

On the remote machine ...

Code:
#  /etc/cups/client.conf
ServerName hypoid


Of course, use your machine name or IP addy for the machine that has printer attached, which is probably not "hypoid."

If I recall correctly, I ran into approximately the same issue you did with regard to "filtered" print spool files and so forth, and expressly telling the remote machine to print elsewhere resolved the issue of the remote machine trying to filter a file that it wasn't going to print.

I don't recall if I had to restart cups after adding that file, or if cups picks it up when it is told to print a file.
Back to top
View user's profile Send private message
tomtom69
Apprentice
Apprentice


Joined: 09 Nov 2010
Posts: 245
Location: Bavaria

PostPosted: Sun Nov 22, 2015 9:17 am    Post subject: Reply with quote

That worked.
Thank you cboldt!!! :D

It looks like if I configure the ipp port manually, the remote machine applies the filter, but the local machine tries to filter again and expects pdf or ps input instead of already filtered data.
But I never thought of changing client.conf to fix this.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum