On 2017-02-05 10:03, Per Jessen wrote:
Carlos E. R. wrote:
On 2017-02-04 09:31, Per Jessen wrote:
When your cups doesn't start automatically or you have to keep trying manually, surely there are messages and logs that will tell you what's going on.
That's the problem, nothing to be seen. Nothing in journal, nothing in messages log.
So the main indication is that cupsd isn't running? pidof cupsd? (not seeing any printers could have other reasons).
The first indication I notice is when I try to print some document, that I can only print to file, say in Libre Office. I then use "rccup status" and it says that it not running. I then investigate a bit, but being in a hurry to print that document I end by starting the service manually.
Anything in /var/log/cups/error_log ?
I'd have to reboot to find out.
If not, I would try starting cups from the command line, perhaps with strace.
But then it starts.
Okay, so in normal operation there is no problem, it's only during start-up.
Right.
The problem is having it started automatically on boot so that when I want to print, it prints. Programs say that there are no printers, that's when I know that it did not start.
Okay.
I would have to hack the service file with strace; but I have the suspicion that systemd doesn't even try to start it.
I meant starting it manually with strace, but you could also try adding it to the service file. You don't need to hack anything, you just override it with a drop-in. I'm not sure how to determine if systemd tries to start it or not - "systemd-analyze critical-chain cups" maybe?
The time after the unit is active or started is printed after the "@" character. The time the unit takes to start is printed after the "+" character. cups.service @1d 19h 21min 25.342s └─network.target @1min 50.734s └─wicked.service @1min 30.138s +20.590s └─wickedd-nanny.service @1min 29.954s +160ms └─wickedd.service @1min 29.758s +171ms └─wickedd-auto4.service @1min 29.205s +492ms └─SuSEfirewall2_init.service @1min 21.163s +7.977s └─basic.target @1min 20.209s └─sockets.target @1min 20.204s └─dbus.socket @1min 20.200s └─sysinit.target @1min 20.130s └─cryptsetup.target @1min 20.125s └─systemd-cryptsetup@cr_cripta.service @9.569s +1min 10.548s └─dev-disk-by\x2duuid-00424b7c\x2d8294\x2d4359\x2db44c\x2d8ae5d9a2d452.device @9.438s
# systemd-analyze critical-chain cups.service The time after the unit is active or started is printed after the "@" character. The time the unit takes to start is printed after the "+" character.
cups.service @21.819s └─network.target @21.800s └─wicked.service @1.138s +20.661s └─wickedd-nanny.service @1.124s +12ms └─wickedd.service @1.091s +9ms └─wickedd-dhcp4.service @987ms +90ms └─dbus.service @891ms └─basic.target @855ms └─sockets.target @855ms └─dbus.socket @855ms └─sysinit.target @854ms └─apparmor.service @172ms +681ms └─systemd-journald.socket └─-.slice
I suspect that even though I want cups to start on boot, it doesn't and waits on cups.socket instead.
On my Leap422 client, there is no cups.socket.
Ah. That's a clue. Telcontar:~ # systemctl status cups[TAB][TAB] cups-browsed.service cups.path cups.service cups.socket cupsd.service Telcontar:~ # systemctl status cups.socket ● cups.socket Loaded: not-found (Reason: No such file or directory) Active: inactive (dead) Telcontar:~ # Telcontar:~ # locate cups.socket /CopiaSeguridadParcial/etc/systemd/system/sockets.target.wants/cups.socket /etc/systemd/system/sockets.target.wants/cups.socket <========= /etc_13.1/systemd/system/sockets.target.wants/cups.socket /other/test_a2/etc/systemd/system/sockets.target.wants/cups.socket /other/test_a2/usr/lib/systemd/system/cups.socket /root/Upgrades/Del_12.1_al_12.3/copia aux_01 para borrar luego/etc/systemd/system/sockets.target.wants/cups.socket Telcontar:~ # Telcontar:~ # l /etc/systemd/system/sockets.target.wants/cups.socket lrwxrwxrwx 1 root root 35 Jun 9 2013 /etc/systemd/system/sockets.target.wants/cups.socket -> /usr/lib/systemd/system/cups.socket Telcontar:~ # Telcontar:~ # l /usr/lib/systemd/system/cups.socket ls: cannot access '/usr/lib/systemd/system/cups.socket': No such file or directory Telcontar:~ # It seems a leftover that was not cleared by the system upgrade :-( I'll delete it. Telcontar:~ # systemctl status cups.[TAB][TAB] cups.path cups.service cups.socket Telcontar:~ # systemctl status cups.socket ● cups.socket Loaded: not-found (Reason: No such file or directory) Active: inactive (dead) Telcontar:~ # I have to tell systemd to reread things, but I don't remember how. And then I have to try a reboot. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)