Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2008
  • Last Modified:

/usr/lib/cups/filter/pdftops failed

I have three PCs on my desk. All feed two Brother MFC-9440CN printer/scanners using USB connections and TrippLite USB switches. All PCs running 12.04 64-bit (but can also boot to Win XP Pro SP3). Two of three PCs work well with both MFC devices doing PDF printing. All three work well on scannning from both MFCs. One PC keeps giving /usr/lib/cups/filter/pdftops fail errors when printing PDF, but not character-based documents. Same error occurs when using cups-pdf to print to file. Offending PC is hp/compaq dx2250M dating from 2007. Win XP side works fine, and this PC has printed PDFs from Ubuntu 12.04 64-bit before.

Posting same question on other forums has failed to yield an answer.  I have attached a copy of the CUPS error file.

John
CUPS-printing-error.pdf
0
cigtoxdoc
Asked:
cigtoxdoc
  • 7
  • 5
  • 2
1 Solution
 
rindiCommented:
You mention your printers are using a USB connection to the PC's to print (or did I misunderstand something), but your pdf shows ipp... You may just need to reconfigure cups so you print directly to the printer.

Besides that make sure to run sudo yum update and after that sudo yum upgrade regularly to make sure your systems stay up-to-date. This could also fix errors caused by a broken package.
0
 
cigtoxdocAuthor Commented:
Thank you for your reply.  First, there is no "yum" with Ubuntu.  If I need to work with *rpm files, I use apt.

Second, I have removed and reloaded both the Brother drivers (Brother has special installer for MFC-9440CN) and the CUPS-PDF driver.  No success.  It still makes it ipp.

Perhaps is you can tell me the local of the file that contains the printer-uri setting I can fix this problem.

John
0
 
rindiCommented:
Of course I meant sudo apt-get update and sudo apt-get upgrade, not yum (don't know how I could get that mixed up).

Can't you use native drivers of Ubuntu instead of the legacy drivers of brother?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
cigtoxdocAuthor Commented:
All Brother-related drivers have been removed, and PC restarted.  The printer comes up as "MFC-9440CN on CUPS MFC-9440CN.  cups-pdf will not work (even after reinstallation) and gives error message "Can't create temporary file."  Nothing else will print except for PDF documents using Qoppa Software's PDF Studio 8 Pro (a proprietary linux equivalent of Adobe Acrobat) and QuickBooks 2001 (running under wine) documents.  PDF documents opened with linux version of Adobe Reader 9 will also print.

So, if looks like some else is going on.

John
0
 
Duncan RoeSoftware DeveloperCommented:
I didn't see "Can't create temporary file." in CUPS-printing-error.pdf that you originally posted. From which program are you seeing that error? strace of that program should expose the culprit
0
 
cigtoxdocAuthor Commented:
Thank you, Mr. Roe:

I looked up the syntax for strace.  It appears that one way to use strace is to use it with the PID for the process in question.  However, when I look at the output of Systems Monitor 3.4.1, I cannot find anything that relates to the program cups-pdf.

Please let me know the correct syntax for strace, and I will run it and post the results here.

John
0
 
Duncan RoeSoftware DeveloperCommented:
I am not familiar with Systems Monitor. I usually do ps axfu in a maximized xterm if I am looking for a process by name. Doing that just now found
root      1950  0.0  0.0   7092  3016 ?        Ss   Apr21   0:00 /usr/sbin/cupsd -C /etc/cups/cupsd.conf

Open in new window

That's all that runs on my system when there is no printing going on. Verify that is the case on your system (ps axfu will show if cupsd has any child processes). Assuming it hasn't, verify that the command pgrep cupsd gives you the same PID as shown by ps.
Assuming all still OK, you are ready to run strace. This produces a lot of output: in testing I found there were a great many uninteresting calls to time() and epoll_wait() so I excluded them, but there's still a lot of output
strace -f -p $(pgrep cupsd) -e 'trace=!time,epoll_wait' 2>cupsd_strace.txt

Open in new window

Wait until the error has occurred, then ^C the strace. Post cupsd_strace.txt as a file attachment (click "Attach File" next to the paperclip). If it's too big, gzip cupsd_strace.txt and post cupsd_strace.txt.gz
0
 
Duncan RoeSoftware DeveloperCommented:
Forgot to mention - you need to be root when running strace, because cupsd is running as root.
0
 
cigtoxdocAuthor Commented:
Mr. Roe, thank you very much for your help.

Here is the command string I used:

root@john-dx2250M:/home/john# strace -p 890 -e 'trace=!time,epoll_wait' 2>cupsd_strace.txt

I had to rename file as this website would not let me name compressed file as you suggested and I had to uncompress it.

John
cupsd-straceexp.txt
0
 
Duncan RoeSoftware DeveloperCommented:
Bad luck, you missed out -f (follow child processes) option which is critical. (I thought the file looked a bit small). If EE doesn't accept .gz, just stick an extra .txt on the end e.g. mv cupsd-straceexp.txt.gz cupsd-straceexp.txt.gz.txt. Then EE should accept it.

I meant for you to use the command exactly as I posted (swipe and middle-click in the xterm) - don't you have pgrep?

I do see the error message being received (from a child process)
0
 
cigtoxdocAuthor Commented:
Hello Mr. Roe:

Thank you for your patience.  The last time I was this deep into command line Unix was 1985-1987.

The command line you suggested did not work as expected.  The command line: strace -f -p 890 -e 'trace=!time,epoll_wait' 2>cupsd_strace.txt created a very sizeable file AFTER I called up the PRINTERS window and had CUPS-PDF do a print test page, print self-test page, and clean print heads.  Those three commands caused the file to be populated.

I have attached a zip file prepared with archive manager.

John
cupsd-strace-experts-exchange.zip
0
 
Duncan RoeSoftware DeveloperCommented:
Your problem is permissions on /tmp
[pid 12977] open("/tmp/032b1536076ce", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW, 0600)        = -1 EACCES (Permission denied)
[pid 12977] write(2, "ERROR: ", 7)       = 7
[pid 12977] write(2, "Can't create temporary file", 27)       = 27
[pid 12977] write(2, "\n", 1)       = 1

Open in new window

When you issue the command ls -ld /tmp, this is what you should see
drwxrwxrwt 80 root root 61440 Apr 25 10:56 /tmp

Open in new window

I.e. the permissions (1st field) should be drwxrwxrwt, and the owner and group (3rd & 4th fields) should both be root. The other fields will be different, of course. If you see something different, use chmod and / or chown as root to correct.
If you have extended attributes on your system (such as access control lists), then make sure that if /tmp has an ACL, then it doesn't lock out user 7. This is the user that the subprocess runs under
[pid 12977] setgid(7)      = 0
[pid 12977] setgroups(1, [7])   = 0
[pid 12977] setuid(7)      = 0

Open in new window

You will need to check /etc/passwd and /etc/group to see what user and group 7 is: on my system it is lp.
0
 
cigtoxdocAuthor Commented:
Hello Mr. Roe:

Thank you for figuring out the cause of problems.

Both problems solved by command kdesudo konqueror and eliminating two extra groups (one listed as mark) using the file properties window in konqueror.  Now working with:
drwxrwx--t  19 john john      4096 Apr 24 23:40 tmp

I need to have tmp as john john as firefox will sometimes put downloads in tmp if there is no file association listed.

This might not be correct Linux, but it works.  My PCs are all single user.

John
0
 
cigtoxdocAuthor Commented:
Two other linux support forums were not able to solve this problem.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 7
  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now