7

I have Ubuntu 16.04 which has been perfect until now.

It has been printing perfectly since day one but the other day I got an error which I stupidly failed to write down and I didn't go look at /var/log/syslog.

The error was something about a cups directory gone missing. At this point I had not been messing with any configuration, it just broke all by itself.

I thought rather than me manually create whatever has gone missing, I will fix it by removing and re-installing software.

I removed and re-installed both HP's print software "hplip" and "cups". This seems to have wrecked cups completely. It no longer starts.

Below is the systemctl status output for cups, before and after a start command:

$ systemctl status cups
  cups.service - CUPS Scheduler
   Loaded: loaded (/lib/systemd/system/cups.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2016-11-06 10:06:50 GMT; 55min ago
     Docs: man:cupsd(8)
  Process: 1029 ExecStart=/usr/sbin/cupsd -l (code=exited, status=1/FAILURE)
 Main PID: 1029 (code=exited, status=1/FAILURE)

Nov 06 10:06:50 vw-desk2 systemd[1]: Started CUPS Scheduler.
Nov 06 10:06:50 vw-desk2 systemd[1]: cups.service: Main process exited, code=exited, status=1/FAILURE
Nov 06 10:06:50 vw-desk2 systemd[1]: cups.service: Unit entered failed state.
Nov 06 10:06:50 vw-desk2 systemd[1]: cups.service: Failed with result 'exit-code'.
Nov 06 10:06:50 vw-desk2 systemd[1]: cups.service: Start request repeated too quickly.
Nov 06 10:06:50 vw-desk2 systemd[1]: Failed to start CUPS Scheduler.
Nov 06 10:06:52 vw-desk2 systemd[1]: cups.service: Start request repeated too quickly.
Nov 06 10:06:52 vw-desk2 systemd[1]: Failed to start CUPS Scheduler.
vince@vw-desk2:~$ 
vince@vw-desk2:~$ systemctl start cups
vince@vw-desk2:~$ 
vince@vw-desk2:~$ systemctl status cups
  cups.service - CUPS Scheduler
   Loaded: loaded (/lib/systemd/system/cups.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2016-11-06 11:03:42 GMT; 24s ago
     Docs: man:cupsd(8)
  Process: 3664 ExecStart=/usr/sbin/cupsd -l (code=exited, status=1/FAILURE)
 Main PID: 3664 (code=exited, status=1/FAILURE)

Nov 06 11:03:42 vw-desk2 systemd[1]: Started CUPS Scheduler.
Nov 06 11:03:42 vw-desk2 systemd[1]: cups.service: Main process exited, code=exited, status=1/FAILURE
Nov 06 11:03:42 vw-desk2 systemd[1]: cups.service: Unit entered failed state.
Nov 06 11:03:42 vw-desk2 systemd[1]: cups.service: Failed with result 'exit-code'.

/var/log/syslog doesn't say anything which jumps out at me:

Nov  6 10:11:54 vw-desk2 anacron[786]: Job `cron.daily' terminated
Nov  6 10:11:54 vw-desk2 anacron[786]: Normal exit (1 job run)
Nov  6 10:17:01 vw-desk2 CRON[3371]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Nov  6 10:19:11 vw-desk2 AptDaemon: INFO: Quitting due to inactivity
Nov  6 10:19:11 vw-desk2 AptDaemon: INFO: Quitting was requested
Nov  6 10:19:11 vw-desk2 org.debian.apt[843]: 10:19:11 AptDaemon [INFO]: Quitting due to inactivity
Nov  6 10:19:11 vw-desk2 org.debian.apt[843]: 10:19:11 AptDaemon [INFO]: Quitting was requested
Nov  6 10:21:52 vw-desk2 systemd[1]: Starting Cleanup of Temporary Directories...
Nov  6 10:21:52 vw-desk2 systemd-tmpfiles[3435]: [/usr/lib/tmpfiles.d/var.conf:14] Duplicate line for path "/var/log", ignoring.
Nov  6 10:21:52 vw-desk2 systemd[1]: Started Cleanup of Temporary Directories.
Nov  6 10:28:01 vw-desk2 CRON[3481]: (root) CMD (   test -x /etc/cron.daily/popularity-contest && /etc/cron.daily/popularity-contest --crond)
Nov  6 10:30:29 vw-desk2 systemd-timesyncd[409]: Timed out waiting for reply from 91.189.94.4:123 (ntp.ubuntu.com).
Nov  6 10:30:29 vw-desk2 systemd-timesyncd[409]: Synchronized to time server 91.189.89.198:123 (ntp.ubuntu.com).
Nov  6 11:03:37 vw-desk2 gnome-session[2312]: Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
Nov  6 11:03:42 vw-desk2 systemd[1]: Started CUPS Scheduler.
Nov  6 11:03:42 vw-desk2 systemd[1]: cups.service: Main process exited, code=exited, status=1/FAILURE
Nov  6 11:03:42 vw-desk2 systemd[1]: cups.service: Unit entered failed state.
Nov  6 11:03:42 vw-desk2 systemd[1]: cups.service: Failed with result 'exit-code'.
Nov  6 11:03:42 vw-desk2 kernel: [ 3413.846764] audit_printk_skb: 84 callbacks suppressed
Nov  6 11:03:42 vw-desk2 kernel: [ 3413.846767] audit: type=1400 audit(1478430222.644:39): apparmor="DENIED" operation="sendmsg" profile="/usr/sbin/cupsd" name="/run/systemd/journal/socket" pid=3664 comm="cupsd" requested_mask="w" denied_mask="w" fsuid=0 ouid=0

On second thoughts, that last line looks like it must be relevant.

How can I get printing working again?

2 Answers 2

9

This happened to me too. Working consistently than rebooted to nothing. I found a couple of apparmor-denied messages in syslog but nothing productive.

Then I noticed /etc/cups/cupsd.conf had gone missing. That was the problem.

You could purse-and-install the cups-daemon but it does ship a default-level config file that you can just copy over.

sudo cp /usr/share/cups/cupsd.conf.default /etc/cups/cupsd.conf
sudo service cups restart
1
  • In my case cupsd.conf seems to have been partially overwritten by an HTML file of the web interface. A bit disturbing, but this is still the solution.
    – trey-jones
    Jul 1, 2020 at 14:22
0

systemd doesn't appear to be providing a lot of extra information.

I'm no cups expert but a general approach would be to attempt building a system with some integrity by uninstalling the cups packages completely, then reinstalling and then adding printers

2
  • 1
    As I said in my original question, I had already uninstalled and re-installed cups. Cups has not run since. I did this again first apt remove cups, then apt purge cups. Followed by apt install cups.
    – user835745
    Nov 8, 2016 at 18:39
  • Googling tells me I should have a file named /etc/cups/cupsd.conf I don't have that file
    – user835745
    Nov 8, 2016 at 18:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .