[SOLVED] CUPS stopped running and can't start it

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
csimon
Level 1
Level 1
Posts: 17
Joined: Fri Mar 10, 2017 11:09 am

[SOLVED] CUPS stopped running and can't start it

Post by csimon »

Fresh install of Mint 19.1 and am in the process of setting it all up. I managed to get my network printer (actually a USB printer HP Deskjet 1220C connected via a little print server) working very easily, printing off a test page etc via the Printers app, but after a while with the Printers app open, the printer icon disappeared before my very eyes.

The Printers app now just says "Printing service not available. Start the service on this computer or connect to another server"

There are two buttons - Start Service which is greyed out, and Connect which when pressed brings up a CUPS dialog that says "CUPS server: /run/cups/cups.sock" with another Connect button, which when pressed results in "CUPS server error. There was an error during the CUPS operation: "failed to connect to server".

I've searched for this problem and can't find an answer, though there was a hint to run a status command on the CUPS service, and this was the result after a reboot:

cups.service - CUPS Scheduler
Loaded: loaded (/lib/systemd/system/cups.service; enabled; vendor preset: enabled)
Active: failed (Result: start-limit-hit) since Fri 2019-05-03 12:10:50 BST; 26s ago
Docs: man:cupsd(8)
Process: 1077 ExecStart=/usr/sbin/cupsd -l (code=killed, signal=TERM)
Main PID: 1077 (code=killed, signal=TERM)

May 03 12:10:50 NoFan-PC systemd[1]: cups.service: Service hold-off time over, scheduling restart.
May 03 12:10:50 NoFan-PC systemd[1]: cups.service: Scheduled restart job, restart counter is at 5.
May 03 12:10:50 NoFan-PC systemd[1]: Stopped CUPS Scheduler.
May 03 12:10:50 NoFan-PC systemd[1]: cups.service: Start request repeated too quickly.
May 03 12:10:50 NoFan-PC systemd[1]: cups.service: Failed with result 'start-limit-hit'.
May 03 12:10:50 NoFan-PC systemd[1]: Failed to start CUPS Scheduler.


I've also removed and reinstalled cups via the software manager but the result is the same.

Can anyone help me get cups running again?
Last edited by csimon on Fri May 03, 2019 8:02 pm, edited 1 time in total.

User avatar
Lord Boltar
Level 5
Level 5
Posts: 688
Joined: Mon Jan 09, 2017 7:24 pm
Location: Sunny Florida

Re: CUPS stopped running and can't start it

Post by Lord Boltar »

Check that the file at /etc/cups/cupsd.conf is an empty file or not

if it is empty run the following

Code: Select all

sudo cp /etc/cups/cupsd.conf.default /etc/cups/cupsd.conf
then make the necessary changes to the config file and start cups

Hope this helps
IF your problem has been solved, please edit your original post and add [SOLVED] to the beginning of the Subject Line. It helps other members

The only way for evil to prosper is for good men to do nothing

DAMIEN1307
Level 9
Level 9
Posts: 2782
Joined: Tue Feb 21, 2017 8:13 pm
Location: Alamogordo, New Mexico, USA

Re: CUPS stopped running and can't start it

Post by DAMIEN1307 »

Try unmasking the service:

Code: Select all

service unmask cups.service
then start the cups service with

Code: Select all

service cups start

If that still doesn't work, try

Code: Select all

sudo apt-get install --reinstall cups cups-browsed cups-client cups-common cups-daemon cups-server-common
then:

Code: Select all

sudo systemctl daemon-reload

If that still doesn't work, post the output from:

Code: Select all

service cups status
and:

Code: Select all

file /lib/systemd/system/cups.service
ORDO AB CHAO

csimon
Level 1
Level 1
Posts: 17
Joined: Fri Mar 10, 2017 11:09 am

Re: CUPS stopped running and can't start it

Post by csimon »

Lord Boltar wrote:
Fri May 03, 2019 4:39 pm
Check that the file at /etc/cups/cupsd.conf is an empty file or not

if it is empty run the following

Code: Select all

sudo cp /etc/cups/cupsd.conf.default /etc/cups/cupsd.conf
then make the necessary changes to the config file and start cups

Hope this helps

/etc/cups/cupsd.conf is not empty, it contains:
PreserveJobHistory No
(I do remember changing a setting to not save the job history).

The default file does not exist:
cat: /etc/cups/cupsd.conf.default: No such file or directory

csimon
Level 1
Level 1
Posts: 17
Joined: Fri Mar 10, 2017 11:09 am

Re: CUPS stopped running and can't start it

Post by csimon »

DAMIEN1307 wrote:
Fri May 03, 2019 5:04 pm
Try unmasking the service:

Code: Select all

service unmask cups.service
then start the cups service with

Code: Select all

service cups start

If that still doesn't work, try

Code: Select all

sudo apt-get install --reinstall cups cups-browsed cups-client cups-common cups-daemon cups-server-common
then:

Code: Select all

sudo systemctl daemon-reload

If that still doesn't work, post the output from:

Code: Select all

service cups status
and:

Code: Select all

file /lib/systemd/system/cups.service
$ service unmask cups.service
unmask: unrecognized service

So I've tried the reinstall as above and teh daemon-reload, but it didn't work.

The output from service cups status is the same as the error I posted originally:

Code: Select all

 cups.service - CUPS Scheduler
   Loaded: loaded (/lib/systemd/system/cups.service; enabled; vendor preset: enabled)
   Active: failed (Result: start-limit-hit) since Fri 2019-05-03 22:33:00 BST; 1min 24s ago
     Docs: man:cupsd(8)
 Main PID: 25413 (code=killed, signal=TERM)

May 03 22:33:00 NoFan-PC systemd[1]: cups.service: Service hold-off time over, scheduling restart.
May 03 22:33:00 NoFan-PC systemd[1]: cups.service: Scheduled restart job, restart counter is at 5.
May 03 22:33:00 NoFan-PC systemd[1]: Stopped CUPS Scheduler.
May 03 22:33:00 NoFan-PC systemd[1]: cups.service: Start request repeated too quickly.
May 03 22:33:00 NoFan-PC systemd[1]: cups.service: Failed with result 'start-limit-hit'.
May 03 22:33:00 NoFan-PC systemd[1]: Failed to start CUPS Scheduler.
$ file /lib/systemd/system/cups.service
/lib/systemd/system/cups.service: ASCII text

DAMIEN1307
Level 9
Level 9
Posts: 2782
Joined: Tue Feb 21, 2017 8:13 pm
Location: Alamogordo, New Mexico, USA

Re: CUPS stopped running and can't start it

Post by DAMIEN1307 »

OK, lets Try:

Code: Select all

sudo apt-get install --reinstall printer-driver-hpcups
But really I don't understand why you're not just using hplip-gui to install your HP printer:

Code: Select all

sudo apt-get install hplip-gui
Then look for the HPLIP Toolbox in your menu.
ORDO AB CHAO

csimon
Level 1
Level 1
Posts: 17
Joined: Fri Mar 10, 2017 11:09 am

Re: CUPS stopped running and can't start it

Post by csimon »

DAMIEN1307 wrote:
Fri May 03, 2019 6:27 pm
OK, lets Try:

Code: Select all

sudo apt-get install --reinstall printer-driver-hpcups
But really I don't understand why you're not just using hplip-gui to install your HP printer:

Code: Select all

sudo apt-get install hplip-gui
Then look for the HPLIP Toolbox in your menu.
I've run the resisntall as above, but cups is still not running.

As to your query as to why I haven't used hplib-gui it's because I didn't know that's what I had to do. I just went into Printers and added it there as that seems the logical and correct place to add a printer. How do you get to know that you're supposed to do something else instead?

Anyway, I've now running hp-setup as it seems to guide me to do in the HPLIB Toolbox, and chsoen Network, but it produces an error message:

Code: Select all

error: No devices found on bus: net
error:  HPLIP cannot detect printers in your network.  This may be due to existing firewall settings blocking the required ports.
                When you are in a trusted network environment, you may open the ports for network services like mdns and slp in the firewall. For detailed steps follow the link.
                 http://hplipopensource.com/node/374  
However, that page does not contain any information and just appears to a be landing page for a knowledgabase. Searching for "firewall" brings up a page about RHEL and Opensuse with instructions about opening several protocols for discovery. I'm not sure it can discover the pritner actually as it's not an HP network printer. It's connected via a Dlink print server.

I'm sure it can't be that complicated! It was working originally via the Printers utility, up until the point cups crashed ,all I had to do was enter the URI of lpd://192.168.1.99/PrintServer1USB (the location of the print server) then select the make and model of printer, and it worked.

I can follow instructions but I'm a newbie and I get the feeling I'm just going down a rabbit hole here.

DAMIEN1307
Level 9
Level 9
Posts: 2782
Joined: Tue Feb 21, 2017 8:13 pm
Location: Alamogordo, New Mexico, USA

Re: CUPS stopped running and can't start it

Post by DAMIEN1307 »

OK...i have to admit i know nothing about connecting through a Dlink print server....more than likely it will have something to do with a firewall setting etc...

hopefully, someone else will answer shortly of what else you can do from this point...at least we got this far with it...hang tight...someone will eventually have the full answer here for you...DAMIEN
ORDO AB CHAO

csimon
Level 1
Level 1
Posts: 17
Joined: Fri Mar 10, 2017 11:09 am

Re: CUPS stopped running and can't start it

Post by csimon »

Lord Boltar wrote:
Fri May 03, 2019 4:39 pm
Check that the file at /etc/cups/cupsd.conf is an empty file or not

if it is empty run the following

Code: Select all

sudo cp /etc/cups/cupsd.conf.default /etc/cups/cupsd.conf
then make the necessary changes to the config file and start cups

Hope this helps

I think this is solved now...inpsired by this reply, I had a look at a test installation I've got on an old PC, and /etc/cups/cups.conf there had a lot of stuff in it, whereas on the installation that's not working it only had one line in it. So I've copied and pasted the contents across and now I can start cups. It's late - I'll try setrting up the printer itself again tomorrow and in the meantime I'll set this to solved.

As I mentioned when I initally replied to this, the one line in it was indeed a config option that I had changed in the Printers utility. Is it possible that the pritners utility had overwritten the entire contents of he file with just that one option??

User avatar
Lord Boltar
Level 5
Level 5
Posts: 688
Joined: Mon Jan 09, 2017 7:24 pm
Location: Sunny Florida

Re: CUPS stopped running and can't start it

Post by Lord Boltar »

csimon wrote:
Fri May 03, 2019 8:02 pm
Lord Boltar wrote:
Fri May 03, 2019 4:39 pm
Check that the file at /etc/cups/cupsd.conf is an empty file or not

if it is empty run the following

Code: Select all

sudo cp /etc/cups/cupsd.conf.default /etc/cups/cupsd.conf
then make the necessary changes to the config file and start cups

Hope this helps

I think this is solved now...inpsired by this reply, I had a look at a test installation I've got on an old PC, and /etc/cups/cups.conf there had a lot of stuff in it, whereas on the installation that's not working it only had one line in it. So I've copied and pasted the contents across and now I can start cups. It's late - I'll try setrting up the printer itself again tomorrow and in the meantime I'll set this to solved.

As I mentioned when I initally replied to this, the one line in it was indeed a config option that I had changed in the Printers utility. Is it possible that the pritners utility had overwritten the entire contents of he file with just that one option??
Most likely that was the case
IF your problem has been solved, please edit your original post and add [SOLVED] to the beginning of the Subject Line. It helps other members

The only way for evil to prosper is for good men to do nothing

User avatar
jim7fl
Level 1
Level 1
Posts: 7
Joined: Sat Sep 29, 2012 10:51 am
Location: White Springs, Florida, United States of America

Re: [SOLVED] CUPS stopped running and can't start it

Post by jim7fl »

I, too, had the same problem, and solved it the same way. I checked on the computer that cups was defective and found the /etc/cups/cupsd.conf had only the one line as described above. I got tot thinking about the answer the OP used about getting a copy of a cupsd.conf file from another similar computer. So, opened up my laptop and emailed myself a copy of the /etc/cups/cupsd.conf and then got back on my desktop and saved the file in the correct location and rebooted. VOILA! Problem solved and I was able to happily print again.

Thanks so much!
Jim Smith
not really a newbie, first computer had DOS 1.0 and Basic 1.0
LinuxMint 19.3
x86_64 Linux 4.4.0-109-generic


32 GB RAM
AMD Quad Core

Living near the banks of the Suwanee River

csimon
Level 1
Level 1
Posts: 17
Joined: Fri Mar 10, 2017 11:09 am

Re: [SOLVED] CUPS stopped running and can't start it

Post by csimon »

jim7fl wrote:
Sat Nov 09, 2019 8:14 pm
I, too, had the same problem, and solved it the same way. I checked on the computer that cups was defective and found the /etc/cups/cupsd.conf had only the one line as described above. I got tot thinking about the answer the OP used about getting a copy of a cupsd.conf file from another similar computer. So, opened up my laptop and emailed myself a copy of the /etc/cups/cupsd.conf and then got back on my desktop and saved the file in the correct location and rebooted. VOILA! Problem solved and I was able to happily print again.

Thanks so much!
:D

Can't believe that something I've done as a newbie has helped someone else!

javiercamano90
Level 1
Level 1
Posts: 39
Joined: Sun Nov 10, 2019 12:22 pm

Re: [SOLVED] CUPS stopped running and can't start it

Post by javiercamano90 »

Hi,

i print from my brother printer model HL1202 from several months ago and recently i couldn't do it anymore, because of a problem with the "cups", when i go to the printers icon, i realize that i was not connected to the server and i get this messages:
1.- "failed to connect to server"
2.- cups service stopped, the cups print spooler does not appear to be running. To correct this, choose system-> Administration->Services from the main menu and look for the "cups" service.
what can i do?, perhaps it's the firewall but i don't know how to fix it :(

Best regards

Javier

Kadaitcha Man
Level 7
Level 7
Posts: 1595
Joined: Mon Aug 27, 2012 10:17 pm

Re: [SOLVED] CUPS stopped running and can't start it

Post by Kadaitcha Man »

javiercamano90 wrote:
Tue Mar 17, 2020 12:01 am
what can i do?
Read the forum rules then start a new thread.
Forum rules
Before you post please read how to get help
It's pronounced kad-eye-cha, not kada-itcha.

Gazman44
Level 1
Level 1
Posts: 9
Joined: Tue Jun 04, 2019 11:58 pm

Re: CUPS stopped running and can't start it

Post by Gazman44 »

csimon wrote:
Fri May 03, 2019 8:02 pm
Lord Boltar wrote:
Fri May 03, 2019 4:39 pm
Check that the file at /etc/cups/cupsd.conf is an empty file or not

if it is empty run the following

Code: Select all

sudo cp /etc/cups/cupsd.conf.default /etc/cups/cupsd.conf
then make the necessary changes to the config file and start cups

Hope this helps

I think this is solved now...inpsired by this reply, I had a look at a test installation I've got on an old PC, and /etc/cups/cups.conf there had a lot of stuff in it, whereas on the installation that's not working it only had one line in it. So I've copied and pasted the contents across and now I can start cups. It's late - I'll try setrting up the printer itself again tomorrow and in the meantime I'll set this to solved.

As I mentioned when I initally replied to this, the one line in it was indeed a config option that I had changed in the Printers utility. Is it possible that the pritners utility had overwritten the entire contents of he file with just that one option??
I don't think this suggestion actually solves the problem.. I don't have another PC that I can copy the /etc/cups/cups.conf file from..

SO, my question is, "What should be in the file: /etc/cups/cups.conf"? or Is there another solution??

Gazman44
Level 1
Level 1
Posts: 9
Joined: Tue Jun 04, 2019 11:58 pm

Re: [SOLVED] CUPS stopped running and can't start it

Post by Gazman44 »

The link below shows a better fix for the Cups Service Problem for others.. and therefore the thread is now "SOLVED".. :)

viewtopic.php?t=310426

cheers..

Post Reply

Return to “Newbie Questions”