Re: [CentOS] what causes CUPS to dis-enable a printer?

2010-02-11 Thread Paul Johnson
On Wed, Feb 10, 2010 at 1:29 PM, Dave tdbtdb+cen...@gmail.com wrote:


 Would it (should it) eventually notice that the server is back and re-enable
 itself just as automatically as it disabled itself?

 Dave


I found several people who offer cron scripts to do exactly that!  It
is amazing what you find after you learn the correct thing to Google
for!  Here, the magic words are lpstat and enabled


http://kbase.redhat.com/faq/docs/DOC-2824

How do I start (enable) printer queues from a cron job in Red Hat
Enterprise Linux 4?


-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] what causes CUPS to dis-enable a printer?

2010-02-11 Thread Dave
On Thu, Feb 11, 2010 at 9:12 AM, Paul Johnson pauljoh...@gmail.com wrote:
 On Wed, Feb 10, 2010 at 1:29 PM, Dave tdbtdb+cen...@gmail.com wrote:
 Would it (should it) eventually notice that the server is back and re-enable
 itself just as automatically as it disabled itself?
 Dave


 I found several people who offer cron scripts to do exactly that!  It
 is amazing what you find after you learn the correct thing to Google
 for!  Here, the magic words are lpstat and enabled


 http://kbase.redhat.com/faq/docs/DOC-2824

 How do I start (enable) printer queues from a cron job in Red Hat
 Enterprise Linux 4?

Handy, only it invokes 'enable' which does not exist on my system.
Probably the centos equivalent is cupsenable?

[r...@cod ~]# rpm -qs cups|grep enable
normal/usr/sbin/cupsenable
normal/usr/share/doc/cups-1.3.7/help/man-cupsenable.html
normal/usr/share/man/man8/cupsenable.8.gz
[r...@cod ~]# man cupsenable|cat -
cupsenable(8) Apple Inc. cupsenable(8)

NAME
   cupsdisable, cupsenable - stop/start printers and classes

SYNOPSIS
   cupsdisable [ -E ] [-U username ] [ -c ] [ -h server[:port] ] [ -r rea-
   son ] destination(s)
   cupsenable [ -E ] [-U username ] [ -c ] [ -h server[:port]  ]  destina-
   tion(s)

DESCRIPTION
   cupsenable starts the named printers or classes.

   cupsdisable stops the named printers or classes.  The following options
   may be used:

I'll test it out next time I have this problem.

mahalo,
Dave
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] what causes CUPS to dis-enable a printer?

2010-02-11 Thread Jobst Schmalenbach

Wouldnt it be much better to use the backend error handler??

instead of placing socket://192.168.168.168:9100 into the device
address you place beh:/1//3/5/socket://192.168.168.168:9100 into
the device address.

The backend error handler is described here:

  
http://www.linuxfoundation.org/collaborate/workgroups/openprinting/database/backenderrorhandler

I use it all the time with a variety of printers and servers (not all servers
and not all printers need it).


JObst




On Thu, Feb 11, 2010 at 01:12:36PM -0600, Paul Johnson (pauljoh...@gmail.com) 
wrote:
 On Wed, Feb 10, 2010 at 1:29 PM, Dave tdbtdb+cen...@gmail.com wrote:
 
 
  Would it (should it) eventually notice that the server is back and re-enable
  itself just as automatically as it disabled itself?
 
  Dave
 
 
 I found several people who offer cron scripts to do exactly that!  It
 is amazing what you find after you learn the correct thing to Google
 for!  Here, the magic words are lpstat and enabled
 
 
 http://kbase.redhat.com/faq/docs/DOC-2824
 
 How do I start (enable) printer queues from a cron job in Red Hat
 Enterprise Linux 4?
 
 
 -- 
 Paul E. Johnson
 Professor, Political Science
 1541 Lilac Lane, Room 504
 University of Kansas
 ___
 CentOS mailing list
 CentOS@centos.org
 http://lists.centos.org/mailman/listinfo/centos

-- 
Howard's conjecture: The total dinner check of a party eating dutch will never 
equal the total of what each diner admits to having eaten.

  | |0| |   Jobst Schmalenbach, jo...@barrett.com.au, General Manager
  | | |0|   Barrett Consulting Group P/L  The Meditation Room P/L
  |0|0|0|   +61 3 9532 7677, POBox 277, Caulfield South, 3162, Australia
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] what causes CUPS to dis-enable a printer?

2010-02-10 Thread Robert Heller
At Tue, 9 Feb 2010 22:37:28 -0600 CentOS mailing list centos@centos.org wrote:

 
 In our computer lab, there are 6 Centos 5.4 workstations. There is an
 HP printer with jet direct card. It often works.
 
 But sometimes users come and get me saying the printer is broken, but
 it is actually working fine for *most* of the workstations.
 
 On the troubled system, I run system-config-printer and I check the
 printer in question (under properties)  and I see the printer has been
 disabled. I mean, the box by the word Enabled is empty.
 
 After I manually (use lprm) remove the print jobs, and set the printer
 to Enabled, then the print queue will start working again.
 
 I've checked the files in /var/log/cups and there's nothing evident.
 error_log has nothing.
 
 We have had the problem during the year (that others have reported in
 this list).  When trying to print some pdf files from Evince, the
 symptom of the problem is that the pdf files don't print. They seem to
 clog the printer.  When that happens, I have seen the Enabled box
 come unchecked in the printer configurator.  However, the most recent
 problems are not associated with the use of Evince.

Unless you have a proper print filter for them (on the Linux system!),
PDF files cannot be printed.  

 I would really appreciate some tips about how to bugshoot this problem.
 
 pj
 
 ps. The Cups server is running on the system in question, lpq shows
 lots of print jobs waiting.

Wondering if the printer *by itself* can manage handling connections
for a number of workstations and arbitrating jobs.  Maybe you need a
Linux print server to manage the print queue and feed jobs to the
printer one at a time.  It seems like some of the workstations are
getting a refused connection and thinking the printer is 'dead' (and
thus disabling it), when it is merely too busy to respond.  A proper
linux print server would queue up the job and be ready for additional
connections. 

 
 

-- 
Robert Heller -- 978-544-6933
Deepwoods Software-- Download the Model Railroad System
http://www.deepsoft.com/  -- Binaries for Linux and MS-Windows
hel...@deepsoft.com   -- http://www.deepsoft.com/ModelRailroadSystem/
  
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] what causes CUPS to dis-enable a printer?

2010-02-10 Thread William Warren
On 2/10/2010 9:15 AM, Robert Heller wrote:
 At Tue, 9 Feb 2010 22:37:28 -0600 CentOS mailing listcentos@centos.org  
 wrote:


 In our computer lab, there are 6 Centos 5.4 workstations. There is an
 HP printer with jet direct card. It often works.

 But sometimes users come and get me saying the printer is broken, but
 it is actually working fine for *most* of the workstations.

 On the troubled system, I run system-config-printer and I check the
 printer in question (under properties)  and I see the printer has been
 disabled. I mean, the box by the word Enabled is empty.

 After I manually (use lprm) remove the print jobs, and set the printer
 to Enabled, then the print queue will start working again.

 I've checked the files in /var/log/cups and there's nothing evident.
 error_log has nothing.

 We have had the problem during the year (that others have reported in
 this list).  When trying to print some pdf files from Evince, the
 symptom of the problem is that the pdf files don't print. They seem to
 clog the printer.  When that happens, I have seen the Enabled box
 come unchecked in the printer configurator.  However, the most recent
 problems are not associated with the use of Evince.
  
 Unless you have a proper print filter for them (on the Linux system!),
 PDF files cannot be printed.


 I would really appreciate some tips about how to bugshoot this problem.

 pj

 ps. The Cups server is running on the system in question, lpq shows
 lots of print jobs waiting.
  
 Wondering if the printer *by itself* can manage handling connections
 for a number of workstations and arbitrating jobs.  Maybe you need a
 Linux print server to manage the print queue and feed jobs to the
 printer one at a time.  It seems like some of the workstations are
 getting a refused connection and thinking the printer is 'dead' (and
 thus disabling it), when it is merely too busy to respond.  A proper
 linux print server would queue up the job and be ready for additional
 connections.



  

I have to agree with Robert here.  Instead of running a separate server 
on each box run a central cups server on one machine and have it take 
care of everything.  I bet since all of the machines are their own 
servers they printer can't keep up and the individual machines are 
timing out...:)
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] what causes CUPS to dis-enable a printer?

2010-02-10 Thread Dave
On Tue, Feb 9, 2010 at 6:37 PM, Paul Johnson pauljoh...@gmail.com wrote:


 After I manually (use lprm) remove the print jobs, and set the printer
 to Enabled, then the print queue will start working again.


Me too, but even stranger, I do not remove the print jobs and they print
fine as soon as I enable the printer again. This is usually after a power
outage or some temporary problem with the main print server. For some reason
client cups instances get offended by the server and disable the printer.
Then after I fix the real problem, I have to go around re-enabling printers
on all the clients.

Would it (should it) eventually notice that the server is back and re-enable
itself just as automatically as it disabled itself?

Dave



-- 
———-
Q: Why should this email be 5 sentences or less?
A: http://five.sentenc.es
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] what causes CUPS to dis-enable a printer?

2010-02-10 Thread Dave
On Tue, Feb 9, 2010 at 8:32 PM, Rajagopal Swaminathan 
raju.rajs...@gmail.com wrote:

 I would strongly suggest using the web interface localhost:631 instead
 of system-config-printer.


In what way is this superior?
Dave



-- 
———-
Q: Why should this email be 5 sentences or less?
A: http://five.sentenc.es
IPRC-help FAQ: https://wailua/wiki/index.php/Faq
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] what causes CUPS to dis-enable a printer?

2010-02-10 Thread Steve Huff


On Feb 10, 2010, at 2:29 PM, Dave wrote:

Would it (should it) eventually notice that the server is back and  
re-enable itself just as automatically as it disabled itself?



not according to the default CUPS configuration under RHEL/CentOS.

http://www.cups.org/documentation.php/ref-cupsd-conf.html

the relevant directive is ErrorPolicy.

-steve

--
If this were played upon a stage now, I could condemn it as an  
improbable fiction. - Fabian, Twelfth Night, III,v

http://five.sentenc.es



PGP.sig
Description: This is a digitally signed message part
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] what causes CUPS to dis-enable a printer?

2010-02-09 Thread Paul Johnson
In our computer lab, there are 6 Centos 5.4 workstations. There is an
HP printer with jet direct card. It often works.

But sometimes users come and get me saying the printer is broken, but
it is actually working fine for *most* of the workstations.

On the troubled system, I run system-config-printer and I check the
printer in question (under properties)  and I see the printer has been
disabled. I mean, the box by the word Enabled is empty.

After I manually (use lprm) remove the print jobs, and set the printer
to Enabled, then the print queue will start working again.

I've checked the files in /var/log/cups and there's nothing evident.
error_log has nothing.

We have had the problem during the year (that others have reported in
this list).  When trying to print some pdf files from Evince, the
symptom of the problem is that the pdf files don't print. They seem to
clog the printer.  When that happens, I have seen the Enabled box
come unchecked in the printer configurator.  However, the most recent
problems are not associated with the use of Evince.

I would really appreciate some tips about how to bugshoot this problem.

pj

ps. The Cups server is running on the system in question, lpq shows
lots of print jobs waiting.


-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] what causes CUPS to dis-enable a printer?

2010-02-09 Thread Rajagopal Swaminathan
Greetings,


On Wed, Feb 10, 2010 at 10:07 AM, Paul Johnson pauljoh...@gmail.com wrote:
 But sometimes users come and get me saying the printer is broken, but
 it is actually working fine for *most* of the workstations.

 On the troubled system, I run system-config-printer and I check the
 printer in question (under properties)  and I see the printer has been
 disabled. I mean, the box by the word Enabled is empty.

I would strongly suggest using the web interface localhost:631 instead
of system-config-printer.

Regards,

Rajagopal
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] what causes CUPS to dis-enable a printer?

2010-02-09 Thread Kwan Lowe
On Tue, Feb 9, 2010 at 11:37 PM, Paul Johnson pauljoh...@gmail.com wrote:
 In our computer lab, there are 6 Centos 5.4 workstations. There is an
 HP printer with jet direct card. It often works.

 But sometimes users come and get me saying the printer is broken, but
 it is actually working fine for *most* of the workstations.

 On the troubled system, I run system-config-printer and I check the
 printer in question (under properties)  and I see the printer has been
 disabled. I mean, the box by the word Enabled is empty.

 After I manually (use lprm) remove the print jobs, and set the printer
 to Enabled, then the print queue will start working again.


There is a cups timeout value that might help. Cups will disable a
printer if it doesn't respond after a certain amount of time. If you
add a Timeout value to cupsd.conf you can either disable or set the
timeout higher.

If that doesn't work, you may need to change the loglevel to debug and
watch until it fails.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos