Subject: [netatalk-admins] PAP end-of-job timeouts?

From: Robert Edwards <[email-masked]>
Date: Wed, 03 Mar 1999 21:41:28 +1100

I have netatalk-981109 running on a Sun Ultra 170 under Solaris 2.7
using the "lp" printing system and the lp2pap.sh script (set up per
the INSTALL/README.SOLARIS instructions).

I have four printers running under AppleTalk: two Apple LaserWriter 630s,
an HP-4M with an Axil Print Server and a Lexmark Optra S with network
option.

Most any print job thrown at the HP/Axil or the Lexmark will print with
no problems at all.

Frequently, large Postscript jobs (over say 200k) will print on the
Apple LaserWriters and then hang the respective print queues (not
disappear from the top of the queue). My guess is that these printers
are not properly disconnecting at the end of the job and never timeout.

Plain text files submitted to these printers go through some LP print
filter to get converted to Postscript and always print just fine, as
do most smaller Postscript jobs.

Can anyone throw any wisdom on this? Can I add something to an LP print
filter to add a command to disconnect the job once it is printed? Is
there a way to setup a timeout so that the Netatalk PAP will automatically
kill the job after a certain period of time? Has anyone else seen anything
similar?

I am quite desperate for a solution as the Academics around here are
getting ready to hang me if this printing problem isn't resolved soon.

I have checked the FAQs and haven't stumbled upon anything helpful (yet).

Cheers,

Bob Edwards,

Computer and Robotics Engineer,       e-mail: [email-masked]
Department of Engineering,            phone:  (+61) 2 6249 4090
Australian National University,       fax:    (+61) 2 6249 0506
Canberra, AUSTRALIA, 0200             mobile: (+61) 0416 166 761
      WWW: http://spigot.anu.edu.au/people/bob/home.html

---

From: [email-masked]
Date: Wed, 03 Mar 1999 10:16:08 -0500

> From:    Robert Edwards <[email-masked]>
> To:      [email-masked]

> filter to add a command to disconnect the job once it is printed?

Try adding "-E" to the pap command in lp2pap.sh.  There are a variety
of printers (I'm guessing the ones where Adobe wrote the PAP
implementation) that don't send EOF on the channel when the job is done
printing.  This is a protocol violation, and very inconvenient for
error reporting.

psf calls pap with the -E option by default.  Probably lp2pap.sh should
do the same, since several common printers exhibit this problem.

:wes

---

From: "J. Guy Stalnaker" <[email-masked]>
Date: Wed, 3 Mar 1999 18:35:39 -0600 (CST)

> do the same, since several common printers exhibit this problem.

Hiya,

Is it possible that I have a problem similar to Robert E.'s, except on
Linux 2.0.35, netatalk1.42b_asun2.1.6, Apple LaserWriter Select310
(parallel port /dev/lp0 polling)?  I send an error handler postscript job
to the printer (errhandler.ps that comes with OzTeX) to print out a page
with any errors.  Imagine my surprise on getting a document page printed
with eight inches of text *over written* by this:

ERROR: timeout
OFFENDING COMMAND: timeout
STACK: 1902.77

For me the jobs queue fine, they just don't all come out of the printer!
Here's what I can tell you (data gathered from actual print attempts):

Output of 'lpq -P PS_300dpi-raw'

raw is ready and printing
Rank   Owner      Job  Files                                 Total Size
active guy        12   Mac Job                               142102 bytes
1st    guy        13   Mac Job                               95425 bytes

Output of 'ls /var/spool/lpd/PS_300dpi-raw':

acct
cfA012buckland
cfA013buckland
dfA012buckland
dfA013buckland
lock
log
status

Contents of /var/spool/lpd/PS_300dpi-raw/lock:

105
cfA012buckland

Contents of /var/spool/lpd/PS_300dpi-raw/cfA012buckland:

Hbuckland
Pguy
JMac Job
TMac Job
Cbuckland
Lguy
fdfA012buckland
UdfA012buckland
NMac Job

========

In this case *nothing* ever came out of the printer.  It was later that I
found the errhandler.ps file to get the printer to print any errors
encountered.  I am associating the timeout error with the failure of these
and many other print jobs to complete successfully.  The problem, at
present, follows this pattern: one job queued will usually print (I don't
know about the filesize issue mentioned by other posters, but I'll be
keeping watch on it now); any job queued while the first job is active will
usually fail to print, as will all subsequent jobs (I've had six queued
jobs disappear this way--off to /dev/null-land apparently).

One final note: the ready light on the printer sometimes will blink for
*minutes* after a job is finished (makes me think that the printer doesn't
know the job it done or lpd hasn't told it the job is done).

GuyS

                                                 ____________
-------------------------------------------------\__________/-----
J. Guy Stalnaker                                  \________/
[email-masked]                         \______/
http://bagend.doit.wisc.edu/theguy                  \____/
Live your life so you've no regrets!                 \__/
------------------------------------------------------\/----------

---

From: [email-masked]
Date: Thu, 04 Mar 1999 10:01:59 -0500

> From:    "J. Guy Stalnaker" <[email-masked]>
> To:      [email-masked]

> (parallel port /dev/lp0 polling)?

This printer is connected directly to the Linux machine over the
parallel port?  Are you concerned that the jobs sent by papd might be
causing the problem?  Perhaps you should examine the PostScript.  You
don't mention what print filters you're using.  Also, you should
probably be examining the error logs that that lpd is able to produce,
see the lf attribute.

:wes

---

From: Robert Edwards <[email-masked]>
Date: Fri, 05 Mar 1999 07:47:26 +1100

Wesley,

Thanks for your suggestion of adding "-E" to the pap command in
lp2pap.sh. Alas, this hasn't helped the problem at all. The print
queue still "hangs" after certain (larger) Postscript jobs are sent.
I am now noticing this happening on the HP printer connected via
the Axil print server.

I note that the "-E" option is not listed in the man page for pap.
Are there any other unlisted options to pap that I could/should be
looking at?

Anyone else got any ideas about this one?

One more note about the jobs causing the problem (they used to print
out fine under CAP 6.0): they are usually larger Postscript files
generally created from LaTeX / dvips and may include embedded Postscript
images in them (although I am not sure about this last one). They
generally print fine, but then "hang" the Solaris 2.7 print queue. Once
the active job on the queue is cleared (using lprm), the rest of the
jobs waiting in the queue print with no problems at all (provided they
aren't also large Postscript files as above). Macs also can't print to
the printer during this time, indicating a protocol block between the
printer and the netatalk box.

Cheers,

Bob Edwards,