Runlevel resets CUPS to 'no' at reboot

I have several 32 bit 13.1 installations, all identical hardware. For some reason, one of them fails to start CUPS on reboot, despite having set this to start at boot in YaST> Runlevel. On reboot I find that Runlevel has CUPS reset as ‘no’ (ie. do not start on boot). To fix the problem I have to ‘Reset> Enable the Service’ in Runlevel, every time I reboot the PC.

I am aware of others having CUPS issues but none appear to be exactly the same as what I am experiencing. Anyone able to help?

There was an issue (months ago) with socket-activation not working for some users with network printers/CUPS servers. Are they full-updated systems?

Try

systemctl enable cups
systemctl start cups

Then see if all is well next reboot

systemctl status cups

(FWIW, I’m using CUPS version from the printing repo, and do not use socket-activation.)

Unfortunately, all not well on reboot:-

shop4:~ # systemctl status cups
cups.service - CUPS Printing Service
Loaded: loaded (/usr/lib/systemd/system/cups.service; enabled)
Active: inactive (dead)

All 32 bit PCs have identical CUPs updates, CUPS version 1.5.4. I use default repositories, plus Packman. I would maybe consider the Printing repo, were it not for the fact that several other identical PCs exhibit no such fault.

Please post /var/log/cups/error_log and enclose it in CODE ( # in the toolbar in the forums ) tags.

Like this

Remove any user identifiable information before you do it (IP addresses etc.)

Not much to help, here. Given that I have rebooted twice, today, I am assuming today’s events would suffice, but there is very little to show and the entry appears to be the same as the other 32 bit PCs:-

var/log/cups/error_log

var/log/cups/error_log

E [13/Oct/2014:09:33:11 +0200] Unable to bind socket for address [v1.::1]:631 - Address already in use.
E [13/Oct/2014:09:33:11 +0200] Unable to bind socket for address 127.0.0.1:631 - Address already in use.
E [13/Oct/2014:11:16:09 +0200] Unable to bind socket for address [v1.::1]:631 - Address already in use.
E [13/Oct/2014:11:16:09 +0200] Unable to bind socket for address 127.0.0.1:631 - Address already in use.

Otherwise it’s just lot’s of identical entries, like ‘[Job 4955] The printer is unreachable at this time.’, when I assume CUPS isn’t running.

On 2014-10-13 11:26, YeboElectronics wrote:
>
> Unfortunately, all not well on reboot:-
>
> shop4:~ # systemctl status cups
> cups.service - CUPS Printing Service
> Loaded: loaded (/usr/lib/systemd/system/cups.service; enabled)
> Active: inactive (dead)

Did you look in the log? It should show the attempt to start it and fail or whatever.

>
> All 32 bit PCs have identical CUPs updates, CUPS version 1.5.4. I use
> default repositories, plus Packman. I would maybe consider the Printing
> repo, were it not for the fact that several other identical PCs exhibit
> no such fault.

You should have this:


Telcontar:~ # l /etc/systemd/system/printer.target.wants/cups.service /etc/systemd/system/sockets.target.wants/cups.socket
lrwxrwxrwx 1 root root 36 Jun  9  2013 /etc/systemd/system/printer.target.wants/cups.service -> /usr/lib/systemd/system/cups.service
lrwxrwxrwx 1 root root 35 Jun  9  2013 /etc/systemd/system/sockets.target.wants/cups.socket -> /usr/lib/systemd/system/cups.socket
Telcontar:~ # l /usr/lib/systemd/system/cups.service /usr/lib/systemd/system/cups.socket
-r--r--r-- 1 root root 163 Mar  4  2014 /usr/lib/systemd/system/cups.service
-r--r--r-- 1 root root 131 Mar  4  2014 /usr/lib/systemd/system/cups.socket
Telcontar:~ # rpm -qf /usr/lib/systemd/system/cups.socket /usr/lib/systemd/system/cups.service
cups-1.5.4-12.13.1.x86_64
cups-1.5.4-12.13.1.x86_64
Telcontar:~ #

Or for 32 bits:


cer@AmonLanc:~> l /etc/systemd/system/printer.target.wants/cups.service /etc/systemd/system/sockets.target.wants/cups.socket
lrwxrwxrwx 1 root root 36 Mar  6  2013 /etc/systemd/system/printer.target.wants/cups.service -> /usr/lib/systemd/system/cups.service
lrwxrwxrwx 1 root root 35 Mar  6  2013 /etc/systemd/system/sockets.target.wants/cups.socket -> /usr/lib/systemd/system/cups.socket
cer@AmonLanc:~>
cer@AmonLanc:~>
cer@AmonLanc:~> l /usr/lib/systemd/system/cups.service /usr/lib/systemd/system/cups.socket
-r--r--r-- 1 root root 163 Mar  4  2014 /usr/lib/systemd/system/cups.service
-r--r--r-- 1 root root 131 Mar  4  2014 /usr/lib/systemd/system/cups.socket
cer@AmonLanc:~> rpm -qf /usr/lib/systemd/system/cups.service /usr/lib/systemd/system/cups.socket
cups-1.5.4-12.13.1.i586
cups-1.5.4-12.13.1.i586
cer@AmonLanc:~>


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

On 2014-10-13 12:26, YeboElectronics wrote:
>
> Not much to help, here. Given that I have rebooted twice, today, I am
> assuming today’s events would suffice, but there is very little to show
> and the entry appears to be the same as the other 32 bit PCs:-
>
> var/log/cups/error_log
>
>
> Code:
> --------------------
> var/log/cups/error_log
>
> E [13/Oct/2014:09:33:11 +0200] Unable to bind socket for address [v1.::1]:631 - Address already in use.
> E [13/Oct/2014:09:33:11 +0200] Unable to bind socket for address 127.0.0.1:631 - Address already in use.
> E [13/Oct/2014:11:16:09 +0200] Unable to bind socket for address [v1.::1]:631 - Address already in use.
> E [13/Oct/2014:11:16:09 +0200] Unable to bind socket for address 127.0.0.1:631 - Address already in use.
> --------------------

That’s your problem, I think.

> Otherwise it’s just lot’s of identical entries, like ‘[Job 4955] The
> printer is unreachable at this time.’, when I assume CUPS isn’t running.

On the contrary, that one means that CUPS is running. CUPS is running at
that time, trying to print, and unable to because it can not reach the
printer.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

I’m certainly no expert when it comes to studying log entries, but I don’t see any reference to CUPS errors in the var/logs/messages file. Then again, maybe I would not expect to see such errors as CUPS is disabled on boot.

When you restart the CUPS service, I assume you can then print okay?

systemctl restart cups

I’m working away this week, so can’t help much further with this, but you may be interested in disabling the socket activation, and having the cupsd daemon listening permanently. (That’s how I have it set up). The workaround is described in this thread:

https://forums.opensuse.org/showthread.php/494781-Cannot-access-CUPS-server-after-update

Associated bug report

https://bugzilla.novell.com/show_bug.cgi?id=857372

If not, then report what is contained in ‘/usr/lib/systemd/system/cups.socket’ and ‘/usr/lib/systemd/system/cups.service’. Someone should be able to assist from there.

On 2014-10-13 15:36, YeboElectronics wrote:
>
> I’m certainly no expert when it comes to studying log entries, but I
> don’t see any reference to CUPS errors in the var/logs/messages file.
> Then again, maybe I would not expect to see such errors as CUPS is
> disabled on boot.
>
>
No, not disabled:


Loaded: loaded (/usr/lib/systemd/system/cups.service; enabled)
Active: inactive (dead)

It is enabled but dead.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

When I restart, there are no printers (all are network printers) to view and I am prompted to start CUPS. I do so and all printers are again visible. Or I can ignore the warning message and go directly to Runlevel and start CUPS there. Either way, printers then perform normally.

Maybe I should wait for the 13.2 release in three week’s time and see if that fixes it.

On 2014-10-14 14:06, YeboElectronics wrote:
>
> When I restart, there are no printers (all are network printers) to view
> and I am prompted to start CUPS. I do so and all printers are again
> visible. Or I can ignore the warning message and go directly to Runlevel
> and start CUPS there. Either way, printers then perform normally.

Just issue “systemctl start cups” or “rccups start”

Anyway, just attempting to print starts it. Look:


Telcontar:~ # rccups stop
redirecting to systemctl stop cups.service
Warning: Stopping cups.service, but it can still be activated by:
cups.path
cups.socket
Telcontar:~ # rccups status
Checking for cupsd:                          unused
cups.service - CUPS Printing Service
Loaded: loaded (/usr/lib/systemd/system/cups.service; enabled)
Active: inactive (dead) since Tue 2014-10-14 14:31:03 CEST; 2s ago
Process: 22153 ExecStart=/usr/sbin/cupsd -f (code=exited, status=0/SUCCESS)
Main PID: 22153 (code=exited, status=0/SUCCESS)

Telcontar:~ #

Then, as plain user, I attempt to check printers:


cer@Telcontar:~> lpq
cp1510n_ps is ready
no entries
cer@Telcontar:~>

which succeeds. So I check:


Telcontar:~ # rccups status
Checking for cupsd:                         running
cups.service - CUPS Printing Service
Loaded: loaded (/usr/lib/systemd/system/cups.service; enabled)
Active: active (running) since Tue 2014-10-14 14:31:09 CEST; 3s ago
Main PID: 22277 (cupsd)
CGroup: /system.slice/cups.service
└─22277 /usr/sbin/cupsd -f

Telcontar:~ #

However, browsing to

http://localhost:631/

does not start cups.

> Maybe I should wait for the 13.2 release in three week’s time and see if
> that fixes it.

Have you tried the workaround suggested by deano_ferrari? Because that’s what people with that problem have done.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Your description matches the experiences detailed in the thread I linked to regarding socket-activation not working. Read post #47 and #48. The latter describes how to remove socket activation and just have cupsd listening actively.