Leap. Cups not working after upgrade from 13.1

Pretty fresh upgrade to Leap 42.1 from 13.1 all is working well except printing over network.
HP printers on Network. They don’t show up in desktop settings and will not print from applications unless CUPS is restarted/started.
I go into yast printers and the printers show up there and the configuration system restarts cups and all is well.
HP manager is sitting happily in system tray.
I can also just do

service cups restart
after a reboot and the printers are accessible.
It seems CUPS is not starting or is starting before the network is up possibly.

Steps I’ve taken so far. Uninstalled printers and all HP services in yast. Then added everything back via yast printer setup after a reboot.
Googled for this problem in Leap.
Seems I need to tell CUPS to start or Start at the right time.
How do I accomplish this?

This is Wife’s machine and I don’t want her to have to jump through any hoops just to print understandably and I can’t be here all the time to start/restart CUPS manually.

I wonder if you have cups.service enabled?

systemctl status cups

If necessary, do

systemctl enable cups
systemctl start cups

From a fresh boot I did

**linux-jf72:/home/ann #** systemctl status cups
cups.service - CUPS Printing Service
   Loaded: loaded (/usr/lib/systemd/system/cups.service; enabled)
   Active: inactive (dead)


No idea how to proceed from here.
How to I make it boot in a live active mode?

I’m a little suspicious of your upgrade. Can you explain how you did this?

Can you post the following?

cat /usr/lib/systemd/system/cups.service

linux-jf72:/home/ann # cat /usr/lib/systemd/system/cups.service
[Unit]
Description=CUPS Printing Service
After=network.target

[Service]
ExecStart=/usr/sbin/cupsd -f

[Install]
WantedBy=multi-user.target

Okay, that looks as it should be.

systemctl restart cups
systemctl status cups

Report back with output from last command

**linux-jf72:/home/ann #** systemctl status cups
cups.service - CUPS Printing Service
   Loaded: loaded (/usr/lib/systemd/system/cups.service; enabled)
   Active: **active (running)** since Wed 2015-12-16 15:49:49 PST; 21s ago
 Main PID: 2680 (cupsd)
   CGroup: /system.slice/cups.service
           └─2680 /usr/sbin/cupsd -f

That is as expected as well. It’s not clear to me why it doesn’t start at boot. Once the network.target has been reached, all should be good

That can be verified with

systemctl list-units -t target
systemctl status network.target

When you next reboot, check

systemctl is-failed cups.service

Sorry.I’m just getting back to this. Got sick and had other stuff get in way.

**linux-jf72:/home/ann #** systemctl list-units -t target
UNIT                 LOAD   ACTIVE SUB    DESCRIPTION
basic.target         loaded active active Basic System
cryptsetup.target    loaded active active Encrypted Volumes
getty.target         loaded active active Login Prompts
graphical.target     loaded active active Graphical Interface
local-fs-pre.target  loaded active active Local File Systems (Pre)
local-fs.target      loaded active active Local File Systems
multi-user.target    loaded active active Multi-User System
network.target       loaded active active Network
nss-lookup.target    loaded active active Host and Network Name Lookups
paths.target         loaded active active Paths
remote-fs-pre.target loaded active active Remote File Systems (Pre)
remote-fs.target     loaded active active Remote File Systems
slices.target        loaded active active Slices
sockets.target       loaded active active Sockets
sound.target         loaded active active Sound Card
swap.target          loaded active active Swap
sysinit.target       loaded active active System Initialization
time-sync.target     loaded active active System Time Synchronized
timers.target        loaded active active Timers

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.


**linux-jf72:/home/ann #** systemctl status network.target
network.target - Network
   Loaded: loaded (/usr/lib/systemd/system/network.target; static)
   Active: **active** since Tue 2015-12-22 08:55:45 PST; 5min ago
     Docs: man:systemd.special(7)
           http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget


**linux-jf72:/home/ann #** systemctl is-failed cups.service
unknown 

No worries…stuff happens…

**linux-jf72:/home/ann #** systemctl is-failed cups.service
unknown 

This is unusual - it means that CUPS was stopped legitimately by some other process for some reason. I can’t think what though…:\

It might be useful to examine the journal log for cups-relate messages perhaps. Reboot, then observe the following

journalctl -u cups

Pretty fresh upgrade to Leap 42.1 from 13.1 all is working well except printing over network.

Just to clarify - was this a clean install or an ‘in-situ’ upgrade?

I can’t make any sense of this.
Logs go back to January 2003.
This machine has been through several upgrades.
The last was from installation media to Leap.
Previously I’ve used zypper dup

From a reboot

Dec 14 12:10:13 linux-jf72 systemd[1]: Starting CUPS Printing Service...
Dec 14 12:10:13 linux-jf72 systemd[1]: Started CUPS Printing Service.
Dec 14 12:10:13 linux-jf72 cupsd[3980]: No limit for Validate-Job defined in policy allowallforanybody and no suitable template found.
Dec 14 12:10:13 linux-jf72 cupsd[3980]: No limit for Cancel-Jobs defined in policy allowallforanybody and no suitable template found.
Dec 14 12:10:13 linux-jf72 cupsd[3980]: No limit for Cancel-My-Jobs defined in policy allowallforanybody and no suitable template found.
Dec 14 12:10:13 linux-jf72 cupsd[3980]: No limit for Close-Job defined in policy allowallforanybody and no suitable template found.
Dec 14 12:10:13 linux-jf72 cupsd[3980]: No limit for CUPS-Get-Document defined in policy allowallforanybody and no suitable template found.
Dec 14 12:10:13 linux-jf72 cupsd[3980]: No JobPrivateAccess defined in policy allowallforanybody - using defaults.
Dec 14 12:10:13 linux-jf72 cupsd[3980]: No JobPrivateValues defined in policy allowallforanybody - using defaults.
Dec 14 12:10:13 linux-jf72 cupsd[3980]: No SubscriptionPrivateAccess defined in policy allowallforanybody - using defaults.
Dec 14 12:10:13 linux-jf72 cupsd[3980]: No SubscriptionPrivateValues defined in policy allowallforanybody - using defaults.
Dec 14 13:22:12 linux-jf72 systemd[1]: Stopping CUPS Printing Service...
Dec 14 13:22:18 linux-jf72 systemd[1]: Stopped CUPS Printing Service.

Hi FlameBait

I wonder if Is the upgrade left some openSUSE 13.1 leftovers… perhaps a chance socket activation is at play here?

This is strange

Dec 14 13:22:12 linux-jf72 systemd[1]: Stopping CUPS Printing Service...
Dec 14 13:22:18 linux-jf72 systemd[1]: Stopped CUPS Printing Service.

Let’s see if anything is returned by

systemctl status cups.socket
**linux-jf72:/home/ann #** systemctl status cups.socket
cups.socket
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

Dec 22 14:50:34 linux-jf72 systemd[1]: **Cannot add dependency job for unit cups.socket, ignoring: Unit cups.socket failed to load: No such file or directory.**
Dec 22 14:50:37 linux-jf72 systemd[1]: **Cannot add dependency job for unit cups.socket, ignoring: Invalid argument**
Dec 22 14:51:41 linux-jf72 systemd[1]: **Cannot add dependency job for unit cups.socket, ignoring: Unit cups.socket failed to load: No such file or directory.**
Dec 22 15:30:01 linux-jf72 systemd[1]: **Cannot add dependency job for unit cups.socket, ignoring: Unit cups.socket failed to load: No such file or directory.**


I expected this part if the unit file doesn’t exist

**linux-jf72:/home/ann #** systemctl status cups.socket
cups.socket
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

but this suggests other problems. I interpret this as leftover systemd unit file configuration from openSUSE 13.1 (where CUPS socket activation was first employed)

Dec 22 14:50:34 linux-jf72 systemd[1]: **Cannot add dependency job for unit cups.socket, ignoring: Unit cups.socket failed to load: No such file or directory.**
Dec 22 14:50:37 linux-jf72 systemd[1]: **Cannot add dependency job for unit cups.socket, ignoring: Invalid argument**
Dec 22 14:51:41 linux-jf72 systemd[1]: **Cannot add dependency job for unit cups.socket, ignoring: Unit cups.socket failed to load: No such file or directory.**
Dec 22 15:30:01 linux-jf72 systemd[1]: **Cannot add dependency job for unit cups.socket, ignoring: Unit cups.socket failed to load: No such file or directory.**

What is reported by the following?

find /etc/systemd/system/ -iname "cups*"

FWIW, this post reported similar behaviour with a TW installation

https://forums.opensuse.org/showthread.php/501942-Fix-if-cups-failures-in-journalctl-output

Not sure if anything there might help. Your issue is a consequence of stale configuration leftover from the upgrade from openSUSE 13.1.

OK here is this bit.

**linux-jf72:/home/ann #** find /etc/systemd/system/ -iname "cups*"
/etc/systemd/system/printer.target.wants/cups.service
/etc/systemd/system/sockets.target.wants/cups.socket
/etc/systemd/system/multi-user.target.wants/cups.path
/etc/systemd/system/cupsd.service


I just got back home.
I’ll look at the thread you indicated with the URL.
It very well could be the consequence of going direct from 13.1 to Leap 42.1 without 13.2 intervening between.

Edit
looking that that thread. This seems different as

service cups restart

enables a working service.

Ah, as I suspected. Remove the following

rm -f /etc/systemd/system/sockets.target.wants/cups.socket
rm -f /etc/systemd/system/multi-user.target.wants/cups.path

Usually it would be enough to then do

systemctl daemon-reload

but as we want to make sure cupsd stays active after your system has booted, you’ll need to reboot anyway.

Hopefully cups will stay running following the next boot.

systemctl status cups

Done and darn LOL.

**linux-jf72:/home/ann #** systemctl status cups
cups.service - CUPS Printing Service
   Loaded: loaded (/usr/lib/systemd/system/cups.service; enabled)
   Active: inactive (dead)

Correction: Remove all of these files

/etc/systemd/system/printer.target.wants/cups.service
/etc/systemd/system/sockets.target.wants/cups.socket
/etc/systemd/system/multi-user.target.wants/cups.path
/etc/systemd/system/cupsd.service

When you do the following

systemctl enable cups

it should generate ‘/etc/systemd/system/multi-user.target.wants/cups.service’ accordingly. Verify this is the case.