LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 01-23-2008, 02:05 PM   #1
trevor4706
Member
 
Registered: Oct 2005
Location: Ottawa, Canada
Distribution: Fedora FC 5& 6
Posts: 34

Rep: Reputation: 16
Cannot print after CUPS update


I am running Fedora 8 in a dual-boot installation with XP. Last Saturday I downloaded some updates, which included some updates to CUPS. Following the update I can no longer print from my HP Photosmart 4180. Printer works fine from XP. When I try to print nothing happens. The printer dialog shows "processing" ad infinitum. In the CUPS admin tool the printer has the statement "Open device failed, will retry in 30 sec...".

The command "lsusb" shows the printer. I've un-installed and re-installed the printer with no change. I have a feeling it's a permissions issue, but am not really sure where to start. Any suggestions would be greatly appreciated.
 
Old 01-24-2008, 07:15 AM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
Try the following as root or equivalent;

Stop the service: service cups stop
Clean out the /var/spool/cups directory: rm -r /var/spool/cups
Re-start the service: service cups start
 
Old 01-24-2008, 06:50 PM   #3
trevor4706
Member
 
Registered: Oct 2005
Location: Ottawa, Canada
Distribution: Fedora FC 5& 6
Posts: 34

Original Poster
Rep: Reputation: 16
Lenard

I did what you suggested, and was unable to re-start cups. When I try to do so, I get the following error message:

cups failed. The error was: Stopping cups: [FAILED]

Starting cups: cupsd: Child exited with status 1!
[FAILED]

And this message from syslog:

Message from syslogd@localhost at Jan 24 19:47:32 ...
cupsd: Unable to read configuration file '/etc/cups/cupsd.conf' - exiting!

The file /etc/cups/cupsd.conf exists, so I'm not exactly sure why cupsd cannot read it.
 
Old 01-24-2008, 07:07 PM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Do you have a backup copy of the .conf file that you can try? If not, can you post the contents here as well as any messages from /var/log/cups?
 
Old 01-24-2008, 07:39 PM   #5
trevor4706
Member
 
Registered: Oct 2005
Location: Ottawa, Canada
Distribution: Fedora FC 5& 6
Posts: 34

Original Poster
Rep: Reputation: 16
Steve

I've been looking at the /etc/cups/cupsd.conf file. Almost every line is commented out with a "#". I have three other cupsd.conf-type files in the /etc/cups directory: cupsd.conf.default, cupsd.conf.rpmnew, and cupsd.conf.save. The first two of these appear identical, while the third looks like a sample conf file.

If I were to remove cups and then re-install, would a new cupsd.conf file be produced?
 
Old 01-24-2008, 08:30 PM   #6
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
IIRC, cupsd.conf.default is a copy of the one that is originally installed by the CUPS package. cupsd.conf.rpmnew was added when the package was updated and cupsd.conf.save should be a backup of your original file. What is the output from the following please:
Code:
diff -us /etc/cups/cupsd.conf{,.save}
That should show whether there were changes made when the package was updated.
 
Old 01-24-2008, 10:16 PM   #7
trevor4706
Member
 
Registered: Oct 2005
Location: Ottawa, Canada
Distribution: Fedora FC 5& 6
Posts: 34

Original Poster
Rep: Reputation: 16
The output indicate that there were changes made. Here it is:

[root@localhost ~]# diff -us /etc/cups/cupsd.conf{,.save}
--- /etc/cups/cupsd.conf 2008-01-24 20:46:07.000000000 -0500
+++ /etc/cups/cupsd.conf.save 2005-10-29 15:14:40.000000000 -0400
@@ -1,39 +1,851 @@
LogFilePerm 0600
MaxLogSize 2000000000
LogLevel info
Printcap /etc/printcap
Port 631
<Location />
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
</Location>
<Location /admin>
<Location /admin>
AuthType Basic
AuthClass System
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
</Location>
-<Location /printers/Epson>
-Order Deny,Allow
-Deny From All
-Allow From 127.0.0.1
-AuthType None
-Allow from All
-</Location>
-Browsing On
-BrowseProtocols cups
-BrowseOrder Deny,Allow
-BrowseAllow from @LOCAL
-BrowseAddress 255.255.255.255
-Listen *:631
 
Old 01-25-2008, 12:31 AM   #8
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
I haven't used all of those browsing options listed at the bottom of the output and unless the Location /printers/Epson section is a duplicate of another part of the file, it looks OK too.

To answer your earlier question, uninstalling and re-installing should remove all of the files (you can remove /etc/cups manually regardless) so you can then add it as a new printer. It's not the ideal solution but it may well be quicker than waiting for somebody who recognises the exact problem.
 
Old 01-25-2008, 12:34 PM   #9
trevor4706
Member
 
Registered: Oct 2005
Location: Ottawa, Canada
Distribution: Fedora FC 5& 6
Posts: 34

Original Poster
Rep: Reputation: 16
I un-installed and reinstalled CUPS, but still got the "open device failed" message. Then I re-traced my steps and realized that when I tried an earlier fix I'd found on a forum, instead of using the command "chmod 700 /usr/lib/cups/backend/hp" I had used "chmod 777/usr/lib/cups/backend/hp". I guess I thought that if giving root rwx permissions was good, giving everyone the same permissions was better. Not so. I ran the command "chmod 700/usr/lib/cups/backend/hp" and tried to print. Bingo, eveything worked as it had before the CUPS update. Go figure.

Thanks for your help, gilead.
 
1 members found this post helpful.
Old 01-25-2008, 12:54 PM   #10
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Check if the problem is with your selinux settings. Cups may be denied access to its own config file.
 
Old 03-12-2008, 03:25 AM   #11
zek
LQ Newbie
 
Registered: May 2007
Distribution: Fedora
Posts: 4

Rep: Reputation: 1
Quote:
Originally Posted by Lenard View Post
Try the following as root or equivalent;

Stop the service: service cups stop
Clean out the /var/spool/cups directory: rm -r /var/spool/cups
Re-start the service: service cups start
Ok, so I did that and now I get the same error message:

Code:
Message from syslogd@localhost at Mar 12 09:18:43 ...
 cupsd: Unable to read configuration file '/etc/cups/cupsd.conf' - exiting!
As well as a SELinux message stating that

Code:
SELinux is preventing cupsd (cupsd_t) "write" to ./spool (var_spool_t).
It's kind enough to suggest that

Code:
SELinux is preventing cupsd (cupsd_t) "write" to ./spool (var_spool_t). 
The SELinux type var_spool_t, is a generic type for all files in the directory
 and very few processes (SELinux Domains) are allowed to write to this SELinux type.
 This type of denial usual indicates a mislabeled file. By default a file created 
in a directory has the gets the context of the parent directory, but SELinux policy 
has rules about the creation of directories, that say if a process running in one 
SELinux Domain (D1) creates a file in a directory with a particular SELinux 
File Context (F1) the file gets a different File Context (F2). 
The policy usually allows the SELinux Domain (D1) the ability to write, unlink, and 
append on (F2). But if for some reason a file (./spool) was created with the wrong context, 
this domain will be denied. The usual solution to this problem is to reset the file 
context on the target file, restorecon -v './spool'. 
If the file context does not change from var_spool_t, then this is probably a bug in policy.
However, I can't imagine any way to implement this solution - where and what is the file './spool'?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CUPS Print Queue Manager for Print Server Matir Linux - Software 11 03-30-2016 02:14 AM
EPSON Stylus Photo R200 - CUPS+Gimp-Print v4.2.7 does not print anymore Harp00 Linux - Newbie 1 05-24-2006 10:59 AM
CUPS update - can no longer print in MDK 10.1 OE crispus Mandriva 0 01-04-2005 07:07 AM
OfficeJet G85, CUPS Web based Admin test print works, lpr/lp dose not. ptal-print OK. NLR Linux - Hardware 2 09-20-2004 02:59 PM
remote cups printing to a smb/cups print server? justanothergeek Linux - Networking 2 09-15-2004 08:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 02:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration