Bug 476612

Summary: Cannot print test page
Product: [Fedora] Fedora Reporter: Christopher Beland <beland>
Component: system-config-printerAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: rawhideCC: atu, johannbg, twaugh
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: system-config-printer-1.1.2-1.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-20 11:01:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
/var/log/cups/error_log
none
troubleshoot.txt file provided by the troubleshooting GUI
none
Debugging output
none
Output from system-config-printer --debug
none
/var/log/cups/error_log when experiencing hang none

Description Christopher Beland 2008-12-16 07:06:48 UTC
Created attachment 327071 [details]
/var/log/cups/error_log

After having printing problems with the latest rawhide, I tried to delete a previously configured printer (the only configured printer on the system) using system-config-printer, and I got a dialog box that said:

>>
CUPS server error

There was an error during the CUPS operation: 'server-error-
service-unavailable'.
<<

But the cups service reported it was running.  I restarted it anyway, and hit the Refresh button.  I got the same error again, but the printer disappeared.

I added the printer back by pressing the New button.

Using the troubleshooter, I enabled debugging, and tried to print a test page.  I got a new error in a dialog box:

>>
Error submitting test page

There was an error during the CUPS operation: 'client-error-not-found'.
<<

# rpm -qa |grep cups |sort
cups-1.4-0.b1.4.fc11.x86_64
cupsddk-debuginfo-1.2.3-5.fc10.x86_64
cups-debuginfo-1.4-0.b1.4.fc11.x86_64
cups-libs-1.4-0.b1.4.fc11.i386
cups-libs-1.4-0.b1.4.fc11.x86_64
hal-cups-utils-0.6.17-4.fc10.x86_64
hal-cups-utils-debuginfo-0.6.17-4.fc10.x86_64
libgnomecups-0.2.3-4.fc10.i386
libgnomecups-0.2.3-4.fc10.x86_64
libgnomecups-debuginfo-0.2.3-4.fc10.x86_64

Attached is output from /var/log/cups/error_log and the troubleshoot.txt file the troubleshooter produced.

For the record, I was doing this via an ssh connection, though I wouldn't expect that matters.  I tried again from a local X login, and got the same dialog box when trying to print the test page.

Oddly, when I do "enscript troubleshoot.txt" or "lpr filename.ps", it works.  "lpr filename.txt" certainly wasn't working earlier today, before I removed and re-added the printer.

This HP LaserJet 1320 works OK with Fedora 9, and I'm pretty sure it worked OK with Fedora 10 final release.

Comment 1 Christopher Beland 2008-12-16 07:07:53 UTC
Created attachment 327072 [details]
troubleshoot.txt file provided by the troubleshooting GUI

Comment 2 Anton Guda 2008-12-16 09:51:32 UTC
If I try to print test page via http://127.0.0.1:631
following error are displayed:

Unsupported format 'application/vnd.cups-banner'!

Comment 3 Anton Guda 2008-12-16 11:27:14 UTC
After dirty rebuild new beta 2: the same error.

Comment 4 Jóhann B. Guðmundsson 2008-12-16 12:03:51 UTC
This smells like a /etc/cups/mime.types & /etc/cups/mime.convs issue

Try adding this to mime.types
in the #CUPS-specific types above the first entry.. 

application/vnd.cups-banner	string(0,'#CUPS-BANNER')

And add this to the mime.convs
in the #PostScript filters beneath the latest entry. 

application/vnd.cups-banner	application/postscript		33	bannertops

Ye could try diffing these files from a work vs non working instance of cups
and see if the maintainer had made some changes and report back.

Thank you..

Comment 5 Jóhann B. Guðmundsson 2008-12-16 12:20:35 UTC
The client-error-not-found could be ghostscript 
make sure it's installed and then try using older/newer version 
and see if it fixes things ( use koji.fedoraproject.org )

Comment 6 Tim Waugh 2008-12-16 12:31:17 UTC
(In reply to comment #5)
> The client-error-not-found could be ghostscript 

No, it definitely isn't that.  CUPS is saying that it doesn't have a printer by that name.  Unfortunately it seems to be just wrong about that, and I'm not sure why it thinks it.

Comment 7 Jóhann B. Guðmundsson 2008-12-16 13:50:47 UTC
Ok so let's start from the top and keep ghostscript out of the picture..

Reported by "beland"

"There was an error during the CUPS operation: 'server-error-
service-unavailable'." & CUPS operation: 'client-error-not-found'.

Cups was running so this smells like some permission errors..

A) s-c-p does not have the necessary privileges to create read etc 
   gnome-keyring? policykit? selinux?

B) file,directory permission errors. 

C) He created the printer again with the same name etc some conflict there.

I do belive this is an s-c-p error and he can confirm that by creating and 
deleting a printer from the web interface and or manually creating and deleting
a printer from cli. 

Reported by "atu"

Now atu should have filed a different bug since 
his report does not confirm nor does not seem to relate to what 
beland reported and what he's ( atu)  seeing seems to be 
mime.type mime.convs related

( these seem to be 2 separated bugs )

So "beland" could you test creating and deleting printers from the web 
and cli and also post the permissions of the cups directory and files.

And you atu report back about comment4 fixes or does not fix your issue.

Comment 8 Jóhann B. Guðmundsson 2008-12-16 15:46:26 UTC
Beland Does uninstall reinstall fix your issue ?
( one user reported similar problem he uninstalled and 
reinstalled in a hurry and he says it fixed his issue )

Btw is this an upgrade or a fresh rawhide install

Comment 9 Christopher Beland 2008-12-16 20:04:05 UTC
This is a rawhide upgrade from Fedora 10 snap 3.  And yes, ghostscript-8.63-4.fc10.x86_64 is installed...

I tried the web interface (http://localhost:631/admin) and added the HP again as a new printer called trip2.  I can successfully print a test page on trip2 from http://localhost:631/printers/trip2 but not from the system-config-printer troubleshooter.

What is it exactly that you would like me to reinstall?  All of the cups RPMs?

Comment 10 Christopher Beland 2008-12-16 20:14:06 UTC
I assume by "cups directory" you mean one of the following?

[root@free-spin beland]# ls -la /var/cache/cups/
total 12056
drwxrwxr-x  3 root lp       4096 2008-12-16 14:55 .
drwxr-xr-x 14 root root     4096 2008-11-01 23:48 ..
-rw-r--r--  1 root root      842 2008-12-16 03:32 hp-LaserJet-1320-series.ipp
-rw-r-----  1 root lp      24198 2008-12-16 14:58 job.cache
-rw-------  1 lp   lp   12237156 2008-12-16 01:32 ppds.dat
-rw-r-----  1 root lp         75 2008-11-30 13:08 remote.cache
drwxrwxr-x  2 root lp       4096 2008-09-25 06:53 rss
-rw-r--r--  1 root root      859 2008-12-16 14:56 trip2.ipp
-rw-r--r--  1 root root      849 2008-12-16 01:35 trip.ipp
[root@free-spin beland]# ls -la /etc/cups/ppd/
total 88
drwxr-xr-x 2 root lp    4096 2008-12-16 14:55 .
drwxr-xr-x 5 root lp    4096 2008-12-16 15:02 ..
-rw-r--r-- 1 root root 19345 2008-12-16 03:32 hp-LaserJet-1320-series.ppd
-rw-r--r-- 1 root root 17937 2008-12-16 14:56 trip2.ppd
-rw-r--r-- 1 root root 17927 2008-12-16 01:35 trip.ppd

Comment 11 Jóhann B. Guðmundsson 2008-12-16 20:30:05 UTC
No need reinstall cups now since we have determine t
hat it's s-c-p not cups.

Any obvious going on if you start s-c-p in debug mode.. 
( system-config-printer ---debug )

Comment 12 Christopher Beland 2008-12-16 21:11:50 UTC
Created attachment 327168 [details]
Debugging output

Attached is the debugging output from system-config-printer --debug.  All I did was start it up, run the troubleshooter, try to print a test page, and quit.

Comment 13 Tim Waugh 2008-12-17 16:05:15 UTC
OK, the problem is that the CUPS test page filename is now different.

Comment 14 Tim Waugh 2008-12-17 16:47:13 UTC
Please try system-config-printer-1.0.12-5.fc11.

Comment 15 Tim Waugh 2008-12-17 17:19:00 UTC
*** Bug 474190 has been marked as a duplicate of this bug. ***

Comment 16 Christopher Beland 2008-12-17 18:06:00 UTC
With system-config-printer-1.0.12-5.fc11.x86_64 the test page now prints, but I still get a dialog box with the error:

>>
CUPS server error

There was an error during the CUPS operation: 'server-error-
service-unavailable'.
<<

I tried to hit "Close" on this dialog box, but system-config-printer froze up.

Comment 17 Jóhann B. Guðmundsson 2008-12-17 18:18:38 UTC
system-config-printer --debug output please :)

Comment 18 Christopher Beland 2008-12-17 18:59:37 UTC
Created attachment 327275 [details]
Output from system-config-printer --debug 

Output attached when running "system-config-printer --debug" as "beland".  I just discovered I don't get an error dialog box when I run system-config-printer as "root".

Comment 19 Tim Waugh 2008-12-18 00:30:36 UTC
Running system-config-printer --debug isn't nearly as useful as attaching the troubleshoot.txt file from running the troubleshooter through to the end...

Comment 20 Christopher Beland 2008-12-18 00:47:53 UTC
Alas, no troubleshoot.txt is produced because system-config-printer freezes when I try to close the server-error-service-unavailable dialog box.

Comment 21 Tim Waugh 2008-12-18 09:39:40 UTC
rpm -q system-config-printer ?

Comment 22 Christopher Beland 2008-12-18 18:02:35 UTC
system-config-printer-1.0.12-5.fc11.x86_64

Comment 23 Tim Waugh 2008-12-19 13:58:47 UTC
Please run '/sbin/service cups restartlog' as root to clear out the error_log file, then '/usr/sbin/cupsctl -U root --debug-logging' to turn on debugging for CUPS, then do the same as before so that you get the server-error-service-unavailable message.  Then please attach the /var/log/cups/error_log file here.  Thanks.

Comment 24 Christopher Beland 2008-12-22 21:55:19 UTC
Created attachment 327699 [details]
/var/log/cups/error_log when experiencing hang

Done.  I am now also getting the following errors in my xterm:

Xlib:  extension "Generic Event Extension" missing on display "localhost:11.0".
Xlib:  extension "Generic Event Extension" missing on display "localhost:11.0".
Xlib:  extension "Generic Event Extension" missing on display "localhost:11.0".
Xlib:  extension "Generic Event Extension" missing on display "localhost:11.0".
Xlib:  extension "Generic Event Extension" missing on display "localhost:11.0".
Xlib:  extension "Generic Event Extension" missing on display "localhost:11.0".

Comment 25 Tim Waugh 2008-12-23 14:41:19 UTC
(In reply to comment #24)
> Xlib:  extension "Generic Event Extension" missing on display "localhost:11.0".

These are harmless.

Could you try the latest system-config-printer RPM from rawhide (1.1.1-1.fc11)?  I'm hoping it was fixed with this change:
  https://fedorahosted.org/system-config-printer/ticket/13

Comment 26 Christopher Beland 2008-12-23 18:21:02 UTC
Sorry, I forgot to mention that the results reported in comment #24 and attachment were with system-config-printer-1.1.1-1.fc11.x86_64, which I had upgraded to in the meantime.

Comment 27 Tim Waugh 2009-01-20 11:01:58 UTC
I think this was fixed in 1.1.2-1.fc11, with this change:
  https://fedorahosted.org/system-config-printer/ticket/127

Comment 28 Christopher Beland 2009-01-25 19:07:56 UTC
Confirmed, I'm able to print the test page with no crash with system-config-printer-1.1.2-1.fc11.x86_64.  Thanks for your help!