LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-21-2016, 03:29 AM   #1
paalmarker
LQ Newbie
 
Registered: Jan 2007
Posts: 28

Rep: Reputation: 0
cups class, no default printer


Cups server version 1.7.5
running on ubuntu 14.04

cupsserver use drivers:
Generic PCL 6/PCL XL Printer - CUPS+Gutenprint v5.2.10 for bl/wh printing
Generic PCL 6/PCL XL Printer Foomatic/pxlcolor for color printing.

Classes are defined with two printers, one primary printer and one secondary.

Printing comes randomly to each printer, practically there are no default printer.

I see in the printer list that the printers after a print job has the tag 'idle-"waiting for the printer to finnish"'.
The panel on the printer shows 'ready to print'. The tag 'idle-"waiting for the printer to finnish"' stays for hours.

My question is, is it the tag "waiting for the printer to finnish"' that makes the printer-class print randomly to primary or secondary printer?

And if so, how can I get rid of the tag?

By restarting the cups server /etc/init.d/cups retart, the tags disappear.
In the morning before the print jobs start, the tags has disappeared as well without restarting.

Paal Marker
 
Old 12-21-2016, 09:10 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
A web search for "cups waiting for the printer to finish" turns up a number of links. Apparently this is not an unusual situation.

Since you are using Ubuntu, you might start with this one: http://askubuntu.com/questions/56298...come-available

As a test, try setting a default printer and seeing whether that affects the problem.
 
Old 12-21-2016, 09:54 PM   #3
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Yes, sometimes it seems that even though the job has been processed, the local machine is not aware that the job is complete. You can examine /etc/cups/printers.conf to get the status. Not sure why it occurs.

FWIW, a recent openSUSE thread on the same topic.
 
Old 12-22-2016, 03:41 AM   #4
paalmarker
LQ Newbie
 
Registered: Jan 2007
Posts: 28

Original Poster
Rep: Reputation: 0
Thanks for answers

I did in advance of making this thread go through all of what I could find on the net concerning the tag 'idle-"waiting for the printer to finnish"'. Most of them were unsolved, and those who had a solution did not match my enviroment. Some suggestions about changing drivers, but I am reluctant to do that, as the generic driver I use prints very well to a range of different models.

The error_log does not make any statements concerning the tag, and the printers.conf does not tell anything.

My key question is if this tag makes the first printer in the class unavailable. If I pause the secondary printer, the primary printer handle the jobs perfect, even with the tag 'idle-"waiting for the printer to finnish"' present.

Or is a random use of defined printers what I have to expect using classes?
 
Old 12-22-2016, 02:15 PM   #5
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
CUPS checks for available printers in a given printer class in the order in which they were added, so I wouldn't expect it to be random as such.
 
Old 01-02-2017, 07:47 AM   #6
paalmarker
LQ Newbie
 
Registered: Jan 2007
Posts: 28

Original Poster
Rep: Reputation: 0
I have defined two of the printers on another server and newer cups version. In additional using a different driver

Cups version 2.1.4 on slackware 14,2
driver: HP LaserJet 700 color MFP M775 Postscript

The printermodel is a HP LaserJet 700 color MFP M775

Testpage from the cupsserver: The problem persists. The printer prints, and the tag idle "waiting for printer to finish" stays for hours.

The server and printer are on different subnets, but there are no fw between.
 
Old 01-02-2017, 07:46 PM   #7
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Does this prevent another job being processed though?
 
Old 01-03-2017, 12:09 AM   #8
paalmarker
LQ Newbie
 
Registered: Jan 2007
Posts: 28

Original Poster
Rep: Reputation: 0
It seems so. Printing to class makes jobs go to random of the two printers defined. In practice there is no default printer.

But I do not know the core of CUPS well enough to determine if the tag "waiting printer to finish" redirect the job to next printer in the class. But this is what I suspect.
 
Old 01-03-2017, 02:55 AM   #9
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
I think you're correct about that. In any case, I note that this BSD bug report claims to have a patch for CUPS to correct this, but doesn't appear to have been fixed upstream yet.

A similar discussion about the issue here, but Michael Sweet appears to have closed it...
https://github.com/apple/cups/issues/4851

This may only affect particular (LPD, AppSocket) network backends
http://lists.cups.org/pipermail/cups...ly/016837.html
The CUPS maintainer wrote...
Quote:
Well, for HP printers we rely on the half-close mechanism to wait for the job to complete. The socket backend closes the outbound socket as soon as all data is sent, then we wait for the printer to close the other side, indicating that it has finished all pages.

PJL and other mechanisms do not scale and suffer from versioning and communication issues. And quite frankly AppSocket (and LPD) are dead as far as future development goes. All modern (since 2010) network printers support IPP and IPP's rich job monitoring, even for (legacy) PostScript jobs. Prior to then you might have issues with PostScript printing over IPP...
Following the discussion there, it seems they're only interested in supporting IPP backend as most modern printers support that protocol now.
 
Old 01-03-2017, 04:54 AM   #10
paalmarker
LQ Newbie
 
Registered: Jan 2007
Posts: 28

Original Poster
Rep: Reputation: 0
Thank you very much for help here, Ferrari.

As I have two servers available here, I will make a test converting from socket to ipp. I will post the result of that in a couple of days.
 
Old 01-03-2017, 06:34 AM   #11
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Great. I'll await your results with interest.
 
Old 01-04-2017, 03:36 AM   #12
paalmarker
LQ Newbie
 
Registered: Jan 2007
Posts: 28

Original Poster
Rep: Reputation: 0
I have changed one of the printers from socket:// to ipp:// and ran a test page from the server.

The tag showing up now has changed from 'Idle-"waiting for the printer to finish"
to Idle - "Waiting for job to complete." And has been there for at last 10 hours now.

So I am back to square one.

Just to make clear, by directing the jobs to the printer it works just fine. It is as members of class the problem occures that there is no default printer.
 
Old 01-04-2017, 04:19 AM   #13
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Quote:
have changed one of the printers from socket:// to ipp:// and ran a test page from the server.

The tag showing up now has changed from 'Idle-"waiting for the printer to finish"
to Idle - "Waiting for job to complete."
Yes, one would hope that the printer status is cleaned up properly after the successful completion of the job.

Quote:
Just to make clear, by directing the jobs to the printer it works just fine. It is as members of class the problem occurs that there is no default printer.
Right, so I guess a bug report is in order then.
 
Old 01-04-2017, 04:42 AM   #14
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Something that might be worth trying for a problematic IPP communication...

The following IPP options appended at the end of your defined URI may be helpful here
Code:
?waitjob=false
Code:
waitprinter=false
For example, using both options together...
Code:
ipp://host/queue?waitjob=false&waitprinter=false
Reference:
https://www.cups.org/doc/network.html#IPP
 
Old 01-04-2017, 06:28 AM   #15
paalmarker
LQ Newbie
 
Registered: Jan 2007
Posts: 28

Original Poster
Rep: Reputation: 0
Thank you very much for your efforts here Ferrari.

Have tested the conf:
ipp://host/queue?waitjob=false&waitprinter=false

It still stays a tag, and now Idle - "Connected to printer." But if this tag will move jobs from default printer in a class is yet to see.

I will have to configure a test enviroment to make sure of that. Will do that tomorrow(If I reach) and post the result.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] setting default printer with CUPs; also changing top and bottom margins klee12 Slackware 3 09-25-2011 12:00 AM
CUPS problem - connecting to local printer as well as CUPS server bobm2011 Linux - Newbie 4 01-11-2010 07:28 AM
CUPS disables/stops my printer by default on boot abecedarian Linux - Desktop 1 04-26-2009 07:45 AM
cups to cups printing through network on usb printer checkmate3001 Linux - Server 2 02-16-2009 12:12 PM
Help with CUPS Printer Class MichaelP Linux - Networking 1 01-26-2006 02:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration