Bug 8507 - CUPS: rpm installed but service not enabled
: CUPS: rpm installed but service not enabled
Status: RESOLVED FIXED
Product: Mageia
Classification: Unclassified
Component: RPM Packages
: 2
: All Linux
: Normal Severity: normal
: ---
Assigned To: Mageia Bug Squad
:
:
:
:
:
: 8318
  Show dependency treegraph
 
Reported: 2012-12-26 14:20 CET by Pierre Jarillon
Modified: 2013-01-18 13:09 CET (History)
5 users (show)

See Also:
Source RPM: cups-1.5.4-1.1.mga2.x86_64.rpm
CVE:


Attachments

Description Pierre Jarillon 2012-12-26 14:20:37 CET
I have a HP network printer on my LAN.
I install Mga3 beta1 and go to in MCC in Hardware -> Set up the printer
Then hplip and other softwares are installed as usual and I got the main screen with "Printing service not available. Start the service on this computer or connect to another server". As I have no time, I stop there.
Later, I come back to the same screen. I use the button "Connect" and wanted to use the local cups on localhost. I receive the message "failed to connect to the server".

I investigate... Cups is installed 
# rpm -qa "*cups*"
python-cups-1.9.62-1.mga3
gutenprint-cups-5.2.9-1.mga3
cups-1.5.4-4.mga3
cups-drivers-foo2zjs-0.0-0.20121012.1.mga3
lib64cups2-1.5.4-4.mga3
cups-common-1.5.4-4.mga3

But the daemon is not started and is not listed in system services. Very difficult to start it...
If I select another server on the LAN, I can print a test page but hp-setup fails (no device found on bus) and the scanner of my multifunction printer is not avalaible.
Comment 1 Christiaan Welvaart 2012-12-27 10:46:29 CET
What is the output of
  systemctl status cups.service
?
Comment 2 Pierre Jarillon 2012-12-27 12:13:15 CET
# systemctl status cups.service
cups.service - CUPS Printing Service
          Loaded: loaded (/usr/lib/systemd/system/cups.service; disabled)
          Active: inactive (dead)
          CGroup: name=systemd:/system/cups.service

Dec 25 02:13:12 localhost systemd[1]: Starting CUPS Printing Service...
Dec 25 02:13:12 localhost systemd[1]: Started CUPS Printing Service.

# systemctl start cups.service

# systemctl status cups.service
cups.service - CUPS Printing Service
          Loaded: loaded (/usr/lib/systemd/system/cups.service; disabled)
          Active: active (running) since Thu, 2012-12-27 12:07:48 CET; 7s ago
        Main PID: 2808 (cupsd)
          CGroup: name=systemd:/system/cups.service
                  └ 2808 /usr/sbin/cupsd -f

Dec 27 12:07:48 localhost systemd[1]: Started CUPS Printing Service.

Then it is possible to add a printer with MCC, but cups is still not listed in system services.
Comment 3 Christiaan Welvaart 2012-12-27 13:03:43 CET
The cups service is supposed to be enabled in the cups-common %post script but that code was disabled by mistake. This should now be fixed in cauldron (cups 1.5.4-5) but for existing installs I don't think anything can be done automatically because it is not possible to distinguish it from an intentionally disabled cups service. So please run:
  systemctl enable cups.service
or
  /usr/share/rpm-helper/add-service cups 1 cups
(this should have been done automatically from the %post script)

I don't see why the cups service would not be listed in the MCC service, it works in my cauldron VM.
Comment 4 Pierre Jarillon 2012-12-28 00:53:18 CET
I just come back at home. 
Cups is now listed in services.
Comment 5 Christiaan Welvaart 2012-12-28 03:03:22 CET
Moving this bug to mga2 since it's also valid there. I'm not sure if this can be hit with a net install, though. Most people will only install the updated cups packages as an upgrade, where the disabled line would not do anything anyway.
Comment 6 Morgan Leijström 2013-01-06 09:41:24 CET
Confirming bug and workaround on mga2-64 net install made late december.

Printer is a network printer from canon, LBP7750Cdn.
I ran mcc printer setup, it installed packages like cups etc, started cups, and i quit mcc.
Installed CQue from canon, configured the printer using it and it worked.
A day later it did not work...
Found this bug (thanks!) and like in #2, cups is here loaded but inactive.
I executed
  /usr/share/rpm-helper/add-service cups 1 cups
and restarted the system, and now cups is active.
Comment 7 Morgan Leijström 2013-01-06 09:46:45 CET
... so i guess the package need be corrected for mga2.
Comment 8 Pierre Jarillon 2013-01-06 10:21:59 CET
I have found the same bug with Mageia 2 yesterday after a new installation.
I have searched and found that a symbolic link was missing in systemd.

Because I was not at home, I am not sure, but I believe that it was
/etc/systemd/system/printer.target.wants/cups.service -> /lib/systemd/system/cups.service

This is the reason why cups is not started when needed.
Comment 9 Oden Eriksson 2013-01-06 23:41:47 CET
Update pushed:
https://wiki.mageia.org/en/Support/Advisories/MGASA-2013-0004
Comment 10 Gerald 2013-01-18 08:55:12 CET
With cups 1.5.4-1.3.mga2 (on Mageia 2, i586, fully updated) this problem still exists. Firefox cannot connect to the server on localhost:631

Cups isn't started after booting.

root  /  > $ systemctl status cups.service
cups.service - CUPS Printing Service
          Loaded: loaded (/lib/systemd/system/cups.service; disabled)
          Active: inactive (dead)
          CGroup: name=systemd:/system/cups.service

I need to start cups manually (login as root, then systemctl start cups.service) to get cups running.

And cups is not listed in MCC system services.
Comment 11 Colin Guthrie 2013-01-18 09:36:10 CET
The service is disabled:

>          Loaded: loaded (/lib/systemd/system/cups.service; disabled)

Does running "systemctl enable cups.service" properly report it as enabled and start at next boot?

I'm not sure why it wouldn't be showing in MCC tho'. Will take a look at that.
Comment 12 Gerald 2013-01-18 12:42:11 CET
(In reply to comment #11)

> Does running "systemctl enable cups.service" properly report it as enabled and
> start at next boot?

Yes.

(I tried to "start" cups.service but "enable" cups.service did the trick).

> I'm not sure why it wouldn't be showing in MCC tho'. Will take a look at that.

No need to take a look at that, this is O.K. now, cups is showing in MCC.
Comment 13 Colin Guthrie 2013-01-18 13:09:56 CET
(In reply to comment #12)
> (In reply to comment #11)
> > I'm not sure why it wouldn't be showing in MCC tho'. Will take a look at that.
> 
> No need to take a look at that, this is O.K. now, cups is showing in MCC.

Well I still think there could be a bug... MCC will show what systemctl --list-units. Because the unit is enabled, and running it will show it. But disabled units are not listed by systemctl (well they are sometimes, but if it's garbage collected then it might disappear). I thought I'd ensured the MCC still looked at all units (by parsing the systemctl --list-unit-files output too) but perhaps I'm still missing something). That is certainly a different bug tho'.

Note You need to log in before you can comment on or make changes to this bug.