[SOLVED] CUPS service not starting and not accessible after printer/scanner install LM19.3XFCE

Forum rules
Before you post please read this
Post Reply
Frankus333
Level 3
Level 3
Posts: 140
Joined: Mon Jan 06, 2014 10:33 pm
Location: Brisbane Australia

[SOLVED] CUPS service not starting and not accessible after printer/scanner install LM19.3XFCE

Post by Frankus333 »

G'day folks

On a new installation of LM19.3XFCE I was setting up my printer/scanner (HP PhotoSmart C7280) as usual, and for some reason I looked at the Server->Settings menu item, and selected "Allow users to cancel any job..." and also changed Advanced Server Settings from "Preserve job history but no files" to "Preserve job files..." (Normally I don't adjust these settings here.) I suspect that may have been a bad mistake, because now after reboot, the cups service won't start, and seems to want me to link to one remotely.

That is, when I select System->Printers in the computer Start menu, the resulting box marked "Printers - localhost" has:

"Printing Service not available. Start the service on this computer, or connect to another server.", and also "Not Connected" in the bottom left corner. It also has the "+ Add" and "Start Service" options greyed out, and only "Connect", the refresh circle and the "Filter" options available. Pressing "Connect" brings up a "Connect to CUPS Server" dialogue box.

I tried to check the status of the cups service with the terminal, and the output says it failed, at boot time, as below:

Code: Select all

frank@NUCLM193XFCE:~$ service cups status
● cups.service - CUPS Scheduler
   Loaded: loaded (/lib/systemd/system/cups.service; enabled; vendor preset: enabled)
   Active: failed (Result: start-limit-hit) since Fri 2020-01-24 15:29:03 AEST; 3h 34min ago
     Docs: man:cupsd(8)
  Process: 985 ExecStart=/usr/sbin/cupsd -l (code=killed, signal=TERM)
 Main PID: 985 (code=killed, signal=TERM)

Jan 24 15:29:03 NUCLM193XFCE systemd[1]: cups.service: Service hold-off time over, scheduling restart.
Jan 24 15:29:03 NUCLM193XFCE systemd[1]: cups.service: Scheduled restart job, restart counter is at 5.
Jan 24 15:29:03 NUCLM193XFCE systemd[1]: Stopped CUPS Scheduler.
Jan 24 15:29:03 NUCLM193XFCE systemd[1]: cups.service: Start request repeated too quickly.
Jan 24 15:29:03 NUCLM193XFCE systemd[1]: cups.service: Failed with result 'start-limit-hit'.
Jan 24 15:29:03 NUCLM193XFCE systemd[1]: Failed to start CUPS Scheduler.
frank@NUCLM193XFCE:~$ 
Trying this with sudo produced the same result, but the same info is printed twice (!?)

I tried to run the Troubleshooter in the "Printers - localhost" Help menu, but this suggests as the first step that I "... choose System->Administration->Services from the main menu and look for the 'cups' service", which doesn't relate to anything I can see (no "Administration" option in "System" menu of computer). The button to move Forward to next step is greyed out, so I can't do anything else with the troubleshooter.

Can anyone help to decipher what may be going on here, and how I can get back control over my printer/scanner?
Last edited by Frankus333 on Wed Feb 05, 2020 9:08 pm, edited 1 time in total.
Frankus333: LM19.3XFCE 64bit; Intel NUC8i3BEH, 4GB RAM, CPU Dual Core i3-8109U Kaby Lake 3.6GHz, 1TB HDD, dual boot Win 10 Home. LM18.3 KDE 64 bit; HP 15 laptop, 4GB RAM, CPU Celeron dual core N2840 2.5GHz, 500GB HDD (triple boot LM19.3 XFCE, Win 8.1)

brian_p
Level 6
Level 6
Posts: 1042
Joined: Thu Jan 17, 2019 9:20 am

Re: CUPS service not starting and not accessible after printer/scanner install LM19.3XFCE

Post by brian_p »

Frankus333 wrote:
Fri Jan 24, 2020 6:43 am

Can anyone help to decipher what may be going on here, and how I can get back control over my printer/scanner?
Backup /etc/cups/cupsd.conf:

Code: Select all

mv /etc/cups/cupsd.conf /etc/cups/cupsd.conf-orig
and do

Code: Select all

cp /usr/share/cups/cupsd.conf.default /etc/cups/cupsd.conf
followed by

Code: Select all

systemctl start cups
--
Brian.

Tadwyn Tiger
Level 1
Level 1
Posts: 1
Joined: Fri Jan 24, 2020 10:52 am

Re: CUPS service not starting and not accessible after printer/scanner install LM19.3XFCE

Post by Tadwyn Tiger »

I had this same problem with one exception. When I used " mv /etc/cups/cupsd.conf /etc/cups/cupsd.conf-orig" I got the message that I didn't have permission to do this. I ended up copying the file to the new name and deleting the original file before continuing on. This worked for me but without the help I got here I would still be trying to figure this out.
Thank you!!

brian_p
Level 6
Level 6
Posts: 1042
Joined: Thu Jan 17, 2019 9:20 am

Re: CUPS service not starting and not accessible after printer/scanner install LM19.3XFCE

Post by brian_p »

Tadwyn Tiger wrote:
Fri Jan 24, 2020 11:44 am
I had this same problem with one exception. When I used " mv /etc/cups/cupsd.conf /etc/cups/cupsd.conf-orig" I got the message that I didn't have permission to do this. I ended up copying the file to the new name and deleting the original file before continuing on. This worked for me but without the help I got here I would still be trying to figure this out.
Thank you!!
Thank you for bringing this up. I completely forgot that both commands should be prefaced by sudo. For example

Code: Select all

sudo mv ...
--
Brian.

Frankus333
Level 3
Level 3
Posts: 140
Joined: Mon Jan 06, 2014 10:33 pm
Location: Brisbane Australia

Re: CUPS service not starting and not accessible after printer/scanner install LM19.3XFCE

Post by Frankus333 »

Thank you Tadwyn Tiger for your timely post. I am reassured by hearing that it worked for you.

Thank you brian_p for your suggestion and subsequent update to it.

This is the second time I am attempting to set up an LM19.3 installation on this machine (one upgrade and one new install), where something has gone wrong, and I am wondering if my decision to change up from 19.2 so early was wise; maybe 19.3 needs more time to settle into stability. Anyway, I have made the jumps, and will continue on with it cautiously for now, in the hope of learning more.

Before attempting any changes to internal setup/config files I am not familiar with, I have done a little more research by videoing the startup text, and found that the cups system made a number of attempts to start, and failed apparently because it could not "...make remote CUPS printers available locally.". The screenshot shows the last bit of these attempts, including the error messages. (Apoligies for the blur; things happen quickly.) EDIT: Image does open in Drawing.

https://www.dropbox.com/s/nu7wr0vh1y9mw ... 0text?dl=0

Does this mean that my adjusting the Server settings during the "add printer" setup (which seemed to have nothing to do with remote printers) has caused the cups service to lock itself into trying only to access printers via the server rather than locally? Or has something else caused the fault in the cups system or whatever else is broken?

My apoligies if I am being overly pedantic or cautious, but these problems have caused a number of wasted days attempting diagnosis and experimenting with adjustments, so I am trying to minimise that.

My main question now is; does this new info confirm the presumed problem diagnosis and the suggested fix? With my limited knowledge, the fix seems easily reversible if needed, but in my experience, permissions etc can make seemingly simple file manipulations more complex than they seem.

Thanks
Frankus333: LM19.3XFCE 64bit; Intel NUC8i3BEH, 4GB RAM, CPU Dual Core i3-8109U Kaby Lake 3.6GHz, 1TB HDD, dual boot Win 10 Home. LM18.3 KDE 64 bit; HP 15 laptop, 4GB RAM, CPU Celeron dual core N2840 2.5GHz, 500GB HDD (triple boot LM19.3 XFCE, Win 8.1)

Frankus333
Level 3
Level 3
Posts: 140
Joined: Mon Jan 06, 2014 10:33 pm
Location: Brisbane Australia

Re: CUPS service not starting and not accessible after printer/scanner install LM19.3XFCE

Post by Frankus333 »

G'day folks

While waiting for a response to my above questions, I have done some more research through the other posts in this forum. I ran the suggested check of the HP system using "hp-check" in the terminal, and this came back with a list of 22 errors noting missing or incompatible packages that were required or optional.

Code: Select all

frank@NUCLM193XFCE:~$ hp-check
Saving output in log file: /home/frank/hp-check.log

HP Linux Imaging and Printing System (ver. 3.17.10)
Dependency/Version Check Utility ver. 15.1

Copyright (c) 2001-15 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Note: hp-check can be run in three modes:
1. Compile-time check mode (-c or --compile): Use this mode before compiling the
HPLIP supplied tarball (.tar.gz or .run) to determine if the proper dependencies
are installed to successfully compile HPLIP.                                    
2. Run-time check mode (-r or --run): Use this mode to determine if a distro    
supplied package (.deb, .rpm, etc) or an already built HPLIP supplied tarball   
has the proper dependencies installed to successfully run.                      
3. Both compile- and run-time check mode (-b or --both) (Default): This mode    
will check both of the above cases (both compile- and run-time dependencies).   

Check types:                                                                    
a. EXTERNALDEP - External Dependencies                                          
b. GENERALDEP - General Dependencies (required both at compile and run time)    
c. COMPILEDEP - Compile time Dependencies                                       
d. [All are run-time checks]                                                    
PYEXT SCANCONF QUEUES PERMISSION                                                

Status Types:
    OK
    MISSING       - Missing Dependency or Permission or Plug-in
    INCOMPAT      - Incompatible dependency-version or Plugin-version

warning: 22-19.3 version is not supported. Using 22-18.2 versions dependencies to verify and install...

---------------
| SYSTEM INFO |
---------------

 Kernel: 5.3.0-26-generic #28~18.04.1-Ubuntu SMP Wed Dec 18 16:40:14 UTC 2019 GNU/Linux
 Host: NUCLM193XFCE
 Proc: 5.3.0-26-generic #28~18.04.1-Ubuntu SMP Wed Dec 18 16:40:14 UTC 2019 GNU/Linux
 Distribution: 22 19.3
 Bitness: 64 bit


-----------------------
| HPLIP CONFIGURATION |
-----------------------

HPLIP-Version: HPLIP 3.17.10
HPLIP-Home: /usr/share/hplip
warning: HPLIP-Installation: Auto installation is not supported for 22 distro  19.3 version 

Current contents of '/etc/hp/hplip.conf' file:
# hplip.conf.  Generated from hplip.conf.in by configure.

[hplip]
version=3.17.10

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/hplip/HP
ppdbase=/usr/share/ppd/hplip
doc=/usr/share/doc/hplip
html=/usr/share/doc/hplip-doc
icon=no
cupsbackend=/usr/lib/cups/backend
cupsfilter=/usr/lib/cups/filter
drv=/usr/share/cups/drv
bin=/usr/bin
apparmor=/etc/apparmor.d
# Following values are determined at configure time and cannot be changed.
[configure]
network-build=yes
libusb01-build=no
pp-build=yes
gui-build=yes
scanner-build=yes
fax-build=yes
dbus-build=yes
cups11-build=no
doc-build=yes
shadow-build=no
hpijs-install=yes
foomatic-drv-install=yes
foomatic-ppd-install=yes
foomatic-rip-hplip-install=no
hpcups-install=yes
cups-drv-install=yes
cups-ppd-install=no
internal-tag=3.17.10
restricted-build=no
ui-toolkit=qt5
qt3=no
qt4=no
qt5=yes
policy-kit=yes
lite-build=no
udev_sysfs_rules=no
hpcups-only-build=no
hpijs-only-build=no
apparmor_build=no


Current contents of '/var/lib/hp/hplip.state' file:
Plugins are not installed. Could not access file: No such file or directory

Current contents of '~/.hplip/hplip.conf' file:
[commands]
scan = /usr/bin/simple-scan %SANE_URI%

[fax]
email_address = 
voice_phone = 

[last_used]
device_uri = hp:/net/Photosmart_C7200_series?ip=192.168.0.12
printer_name = 
working_dir = .

[polling]
device_list = 
enable = false
interval = 5

[refresh]
enable = false
rate = 30
type = 1

[settings]
systray_messages = 0
systray_visible = 0

[upgrade]
last_upgraded_time = 1579870097
notify_upgrade = false
pending_upgrade_time = 0

[installation]
date_time = 01/27/20 15:29:38
version = 3.17.10


 <Package-name>        <Package-Desc>      <Required/Optional> <Min-Version> <Installed-Version> <Status>   <Comment>

-------------------------
| External Dependencies |
-------------------------

 error: cups          CUPS - Common Unix Printing System                           REQUIRED        1.1             -               MISSING    'CUPS may not be installed or not running'
 gs                   GhostScript - PostScript and PDF language interpreter and previewer REQUIRED        7.05            9.26            OK         -
 error: xsane         xsane - Graphical scanner frontend for SANE                  OPTIONAL        0.9             -               MISSING    'xsane needs to be installed'
 scanimage            scanimage - Shell scanning program                           OPTIONAL        1.0             1.0.27          OK         -
 error: dbus          DBus - Message bus system                                    REQUIRED        -               1.12.2          MISSING    'DBUS may not be installed or not running'
 policykit            PolicyKit - Administrative policy framework                  OPTIONAL        -               0.105           OK         -
 network              network -wget                                                OPTIONAL        -               1.19.4          OK         -
 avahi-utils          avahi-utils                                                  OPTIONAL        -               0.7             OK         -

------------------------
| General Dependencies |
------------------------

 error: libjpeg       libjpeg - JPEG library                                       REQUIRED        -               -               MISSING    'libjpeg needs to be installed'
 error: cups-devel    CUPS devel- Common Unix Printing System development files    REQUIRED        -               -               MISSING    'cups-devel needs to be installed'
 error: cups-image    CUPS image - CUPS image development files                    REQUIRED        -               -               MISSING    'cups-image needs to be installed'
 error: libpthread    libpthread - POSIX threads library                           REQUIRED        -               b'2.27'         MISSING    'libpthread needs to be installed'
 error: libusb        libusb - USB library                                         REQUIRED        -               1.0             MISSING    'libusb needs to be installed'
 sane                 SANE - Scanning library                                      REQUIRED        -               -               OK         -
 error: sane-devel    SANE - Scanning library development files                    REQUIRED        -               -               MISSING    'sane-devel needs to be installed'
 error: libnetsnmp-devel libnetsnmp-devel - SNMP networking library development files REQUIRED        5.0.9           -               MISSING    'libnetsnmp-devel needs to be installed'
 error: libcrypto     libcrypto - OpenSSL cryptographic library                    REQUIRED        -               1.1.1           MISSING    'libcrypto needs to be installed'
 python3X             Python 2.2 or greater - Python programming language          REQUIRED        2.2             3.6.9           OK         -
 error: python3-notify2 Python libnotify - Python bindings for the libnotify Desktop notifications OPTIONAL        -               -               MISSING    'python3-notify2 needs to be installed'
 error: python3-pyqt4-dbus PyQt 4 DBus - DBus Support for PyQt4                         OPTIONAL        4.0             -               MISSING    'python3-pyqt4-dbus needs to be installed'
 error: python3-pyqt4 PyQt 4- Qt interface for Python (for Qt version 4.x)         REQUIRED        4.0             -               MISSING    'python3-pyqt4 needs to be installed'
 python3-dbus         Python DBus - Python bindings for DBus                       REQUIRED        0.80.0          1.2.6           OK         -
 python3-xml          Python XML libraries                                         REQUIRED        -               2.2.5           OK         -
 error: python3-devel Python devel - Python development files                      REQUIRED        2.2             3.6.9           MISSING    'python3-devel needs to be installed'
 python3-pil          PIL - Python Imaging Library (required for commandline scanning with hp-scan) OPTIONAL        -               1.1.7           OK         -
 python3-reportlab    Reportlab - PDF library for Python                           OPTIONAL        2.0             3.4.0           OK         -

--------------
| COMPILEDEP |
--------------

 error: libtool       libtool - Library building support services                  REQUIRED        -               -               MISSING    'libtool needs to be installed'
 error: gcc           gcc - GNU Project C and C++ Compiler                         REQUIRED        -               7.4.0           MISSING    'gcc needs to be installed'
 make                 make - GNU make utility to maintain groups of programs       REQUIRED        3.0             4.1             OK         -

---------------------
| Python Extentions |
---------------------

 cupsext              CUPS-Extension                                               REQUIRED        -               3.17.10         OK         -
 hpmudext             IO-Extension                                                 REQUIRED        -               3.17.10         OK         -

----------------------
| Scan Configuration |
----------------------

'/etc/sane.d/dll.d/hpaio' not found.
 hpaio                HPLIP-SANE-Backend                                           REQUIRED        -               3.17.10         OK         'hpaio found in /etc/sane.d/dll.conf'
 scanext              Scan-SANE-Extension                                          REQUIRED        -               3.17.10         OK         -

------------------------------
| DISCOVERED SCANNER DEVICES |
------------------------------

No Scanner found.

--------------------------
| DISCOVERED USB DEVICES |
--------------------------

No devices found.

---------------------------------
| INSTALLED CUPS PRINTER QUEUES |
---------------------------------

 
lpstat
------
Type: Unknown
Device URI: Bad file descriptor


--------------
| PERMISSION |
--------------

 
-----------
| SUMMARY |
-----------

Missing Required Dependencies
-----------------------------
error: 'libcups2' package is missing/incompatible 
error: 'libdbus-1-dev' package is missing/incompatible 
error: 'libjpeg8-dev' package is missing/incompatible 
error: 'libcups2-dev' package is missing/incompatible 
error: 'cups-bsd' package is missing/incompatible 
error: 'cups-client' package is missing/incompatible 
error: 'libcupsimage2-dev' package is missing/incompatible 
error: 'build-essential' package is missing/incompatible 
error: 'libusb-1.0.0-dev' package is missing/incompatible 
error: 'libsane-dev' package is missing/incompatible 
error: 'libsnmp-dev' package is missing/incompatible 
error: 'snmp-mibs-downloader' package is missing/incompatible 
error: 'openssl' package is missing/incompatible 
error: 'python3-pyqt4' package is missing/incompatible 
error: 'python3-dev' package is missing/incompatible 
error: 'libtool' package is missing/incompatible 
error: 'libtool-bin' package is missing/incompatible 
error: 'build-essential' package is missing/incompatible 

Missing Optional Dependencies
-----------------------------
error: 'xsane' package is missing/incompatible 
error: 'python3-notify2' package is missing/incompatible 
error: 'mate-notification-daemon' package is missing/incompatible 
error: 'python3-dbus.mainloop.qt' package is missing/incompatible 

Total Errors: 17
Total Warnings: 0


Done.

frank@NUCLM193XFCE:~$ ls /etc/cups/ppd
HP-Photosmart-C7200-series.ppd  HP-PhotoSmart-C7280-Fax.ppd
This was not very reassuring, although further reading in the forum gave me the impression that there are varying opinions about whether the error messages amount to much, and about the best way to install printers, and just what packages and plugins are required, and whether they should come from the repos or the manufacturer.

I checked all my other Linux installations, and on 3 different machines, 32 and 64 bits, LM19.3XFCE, LM18.3KDE and Kubuntu 18.04.3 DEs, all came back with from 14 to 17 listed errors, the same as the current installation I am working on setting up. However, they all work properly, printing and scanning. So much for that check.

Rather that wait any longer for a reply, I ran the three lines of code suggested by brian_p, prefaced with "sudo", and bingo, the problem was fixed; printing and scanning working properly. I re-ran the "hp-check", and got the same list of errors, [EDIT] but also a lot more lines saying "Cannot adopt OID in.....", which appear in the results for the other installations, but weren't here in this one until the fault was fixed (!?!).

Many thanks for your help brian_p; you "got it in two".

I still have questions about how this mixup could have occurred during my setup, and whether my adjusting the Server options could have caused it, which I will continue to wonder about.

EDIT:
I am also now curious about why replacing the configuration file with the default did not lead to the requirement to set up my printer again. It was just there in localhost, and worked, without me having to do anything else.

BTW; not sure if this is relevant, but I use some KDE apps, and therefore have the Kubuntu backports set up in software sources, and have both "Launch {KDE, Gnome} services at startup" set in Settings->Session and Startup->Advanced.

Cheers
Last edited by Frankus333 on Wed Feb 05, 2020 9:07 pm, edited 1 time in total.
Frankus333: LM19.3XFCE 64bit; Intel NUC8i3BEH, 4GB RAM, CPU Dual Core i3-8109U Kaby Lake 3.6GHz, 1TB HDD, dual boot Win 10 Home. LM18.3 KDE 64 bit; HP 15 laptop, 4GB RAM, CPU Celeron dual core N2840 2.5GHz, 500GB HDD (triple boot LM19.3 XFCE, Win 8.1)

Frankus333
Level 3
Level 3
Posts: 140
Joined: Mon Jan 06, 2014 10:33 pm
Location: Brisbane Australia

Re: CUPS service not starting and not accessible after printer/scanner install LM19.3XFCE

Post by Frankus333 »

G'day folks

Looks like there is no more interest in this one or my followup questions, so I will mark it as solved to finish up.

Cheers
Frankus333: LM19.3XFCE 64bit; Intel NUC8i3BEH, 4GB RAM, CPU Dual Core i3-8109U Kaby Lake 3.6GHz, 1TB HDD, dual boot Win 10 Home. LM18.3 KDE 64 bit; HP 15 laptop, 4GB RAM, CPU Celeron dual core N2840 2.5GHz, 500GB HDD (triple boot LM19.3 XFCE, Win 8.1)

menltkns
Level 1
Level 1
Posts: 1
Joined: Thu Feb 13, 2020 1:22 pm

Re: [SOLVED] CUPS service not starting and not accessible after printer/scanner install LM19.3XFCE

Post by menltkns »

Thanks to Brian_p. I also was having CUPS that would not start. Your 3 step process got my HP printer showing up again. My wife likes printing color photos of our new grandbaby so needless to say this was huge.

Thanks, John

getglenn
Level 1
Level 1
Posts: 1
Joined: Thu May 21, 2020 10:29 pm

Re: [SOLVED] CUPS service not starting and not accessible after printer/scanner install LM19.3XFCE

Post by getglenn »

Thankyou, this solved my problem too...

Post Reply

Return to “Printers & Scanners”