Solved

/usr/lib/cups/filter/pdftops failed

Posted on 2014-04-18
14
1,584 Views
Last Modified: 2014-04-24
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
Comment
Question by:cigtoxdoc
  • 7
  • 5
  • 2
14 Comments
 
LVL 87

Expert Comment

by:rindi
ID: 40010492
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
 

Author Comment

by:cigtoxdoc
ID: 40010617
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
 
LVL 87

Expert Comment

by:rindi
ID: 40010627
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
 

Author Comment

by:cigtoxdoc
ID: 40010700
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
 
LVL 34

Expert Comment

by:Duncan Roe
ID: 40014186
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
 

Author Comment

by:cigtoxdoc
ID: 40017369
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
 
LVL 34

Expert Comment

by:Duncan Roe
ID: 40017704
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 34

Expert Comment

by:Duncan Roe
ID: 40018920
Forgot to mention - you need to be root when running strace, because cupsd is running as root.
0
 

Author Comment

by:cigtoxdoc
ID: 40019120
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
 
LVL 34

Expert Comment

by:Duncan Roe
ID: 40019237
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
 

Author Comment

by:cigtoxdoc
ID: 40019959
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
 
LVL 34

Accepted Solution

by:
Duncan Roe earned 500 total points
ID: 40021752
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
 

Author Comment

by:cigtoxdoc
ID: 40021837
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
 

Author Closing Comment

by:cigtoxdoc
ID: 40021840
Two other linux support forums were not able to solve this problem.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

System overheating may become a serious problem if not taken care of at the proper time. I am writing this article because I faced a similar problem. Intro All electronic devices produce heat, but computers are a special case - the processors bo…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now