I am running Ubuntu 14.10 and when I open up the Printers dialog, I get an error message "Printing service not available. Start the service on this computer or connect to another server".

The start service button is greyed out.

I have tried

$ sudo service cups start
start: Job is already running: cups

Followed by

ps -ef|grep cups | grep -v grep
root      1210     1  0 08:15 ?        00:00:03 /usr/sbin/cups-browsed

I've tried to find some information in the logs about this, but the logs haven't been touched for days (and they are zero bytes)

ls -t -l
total 96
-rw-r----- 1 root lpadmin    0 Jan  3 08:45 access_log
-rw-r----- 1 root lpadmin    0 Jan  3 08:45 page_log
-rw-r----- 1 root lpadmin 7920 Jan  2 13:22 access_log.1
-rw-r----- 1 root lpadmin 3389 Jan  2 13:17 page_log.1
-rw-r----- 1 root lpadmin  125 Dec 31 09:20 access_log.2.gz
-rw-r----- 1 root lpadmin    0 Dec 31 08:29 error_log
...

Only other clue I've found is the following repeated many times in dmesg

[17169.471390] audit: type=1400 audit(1421413284.183:1700): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/cups/backend/cups-pdf" pid=26540 comm="apparmor_parser"
[17169.471398] audit: type=1400 audit(1421413284.183:1701): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/cupsd" pid=26540 comm="apparmor_parser"
[17169.492953] audit: type=1400 audit(1421413284.207:1702): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="third_party" pid=26540 comm="apparmor_parser"
[17169.496523] init: cups main process (26541) terminated with status 1
[17169.496532] init: cups main process ended, respawning

I've tried

sudo apt-get purge cups
sudo apt-get install cups --install-suggests

but still no change.

I've filed a bug about this at https://bugs.launchpad.net/ubuntu/+source/cups/+bug/1407958 but is there anything obvious I've missed/should have checked?

share|improve this question
1  
try again and check logs in: tail /var/log/syslog – Benjamin Jan 16 '15 at 13:56
    
That "ps" is wrong. I would have expected also to see a /usr/sbin/cupsd – Rinzwind Jan 16 '15 at 14:36
    
@Benjamin, I think I see the problem. In /var/log/syslog, I see the error ` cupsd: Unable to open "/etc/cups/cupsd.conf": No such file or directory` How can I force this file to get recreated? – ec2011 Jan 19 '15 at 10:04
up vote 10 down vote accepted

After a bit of searching and playing around, thanks to @Benjamin's comment above, I finally found that there is a default configuration file which should be installed in /usr/share/cups/cupsd.conf.default.

I ran

sudo cp /usr/share/cups/cupsd.conf.default /etc/cups/cupsd.conf
sudo service cups restart

and since then it worked!

I still have no idea how the file got lost in the first place though.

share|improve this answer
    
solved my issue with cups in 16.10 – Ace May 8 '17 at 15:22

I ran:

sudo apt-get purge cups
sudo apt-get install cups --install-suggests

and then I checked that the configuration was correct. I still got a cups error trying to access a network HP printer, and I had to reinstall the printer, and then I got it to work.

share|improve this answer
    
That has pretty much the same effect as restoring the default configuration and restarting the CUPS service like in the accepted answer – but it's far more laborious. – David Foerster Nov 15 '16 at 13:49
    
To respond the the prior comment, the hplip needed to be removed and reinstalled using sudo apt-get purge hplp, then sudo apt-get hplip. – Python Jim Dec 5 '16 at 4:06
    
Why? Why was it not enough to reset the configuration and restart the service? The commands in your answer achieve no other outcome than that. – David Foerster Dec 5 '16 at 9:25
    
The problem was when cups got corrupted it had corrupted my hplip service as well, and restoring cups did not restore the hplip service, that is why the second install was required. – Python Jim Dec 12 '16 at 4:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.