LPRng: Runaway and DNS lookups

2004-04-21 Thread Russell Adams
I've got a print queue with an lp entry for a printer who's DNS name
was removed.

Someone sent print to the queue, and of course LPRng can't resolve the
name to contact the printer. This works properly.

As an unintended consequence, LPRng has brought our DNS server to its
knees with a tight loop of dns lookups that fail for the name that no
longer exists. We're talking hundreds of lookups a second, being sent
by a 2.4 ghz server to an old 400 mhz DNS box. It didn't stand a
chance. =]

Obviously I'll correct my printcap, however I don't think the tight
loop to the DNS server was intended to work quite like that.

I've tried updating my connect_interval to 5 seconds, but it did not
change the behavior.

I'm running 3.8.26 on Redhat ES 2.1.

Russell

-
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:   | example:
subscribe LIST|  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST  |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-


LPRng: Re: LPRng on RedHat 9.0 talking to SCO print queues

2004-04-21 Thread Patrick Powell
On Tue, Apr 20, 2004 at 12:28:16PM -0400, bmohrhardt wrote:
> Dear Mr. Powell :
> 
>I have been integrating some RedHat 9.0 stations into my network, 
> replacing Windoze as much as possible. My servers are still both running 
> SCO Openserver 5.0.5, handling our main software applications as well as 
> the print queues. In order to get the network printers working, we 
> downloaded LPRng-3.8.19-3.1 from rpmfind.net and 'redhat-switch-printer' 
> to change from CUPS to LPRng. Attempting to print from the RedHat 
> stations using CUPS caused the jobs to sit on the local station's queue 
> and never get to the server.

You may want to get the latest RPM from http://www.lprng.com
or even just compile and install it from source.

> 
>The printing via LPRng works very well for "modern" HP printers 
> (LaserJet 4000,4100, 4200, 1200, 1300, etc.) We have had a couple of 
> issues, and I was just curious if you knew of a resolution. We have an 
> HP LaserJet 6P connected via an HP JetDirect 170x using TCP/IP with a 
> static IP address. Text-based jobs from our servers print all day long. 
> If the RedHat 9.0 station sets it up as a local (/dev/lp0) printer, it 
> works flawlessly. However, we cannot print to it from the RedHat 9.0 
> boxes using the UNIX (lpd) queue type. The job gets sent, but the 
> printer comes up with a "line too long" message, and the rest of the job 
> is garbled. It is almost as if the RedHat box is sending the remote 
> printing job using a level of PostScript that the older printer can't 
> handle. Yet, there is no option (unless I missed it) to lower the 
> PostScript level, if that is indeed the problem. This has been very 
> frustrating, and is slowing down my desire to migrate more of my users 
> away from Windoze.

I am puzzled by this one.  I have an HP6P here and it prints fine,
with NO filter.  The printcap setup  is:

lp6|HP Lazy Jet (slow):
  :sd=/var/spool/lpd/%P
  :lp=10.0.0.23%9100

> 
>The second issue is on our LaserJet 4100tn. As you know, the 't' 
> means that there is an additional 500-sheet tray, that is selectable (in 
> theory) using good-old ESC sequences. They stock Tray 1 with Letterhead, 
> so that it is only used when the user selects it. Tray 2 is the default 
> tray, and contains plain white 8 1/2 x 11 stock. I know that the raw ESC 
> sequence works, as I have been able to choose that tray for a text-based 
> job sent from the server. However, when the remote jobs are sent from 
> the RedHat boxes, we have not yet figured out how to access that 
> command. We have tried various options (-Zupper, -Ztray1, etc.), but we 
> have no way of being certain that the commands are even being passed 
> along. The remote jobs coming into my SCO servers seem to go directly to 
> the queue (rapidly) without even being processed by the interface scripts.

You need to use/add the ifhp filter:

lp:
  :sd=/var/spool/lpd/%P
  :if=/usr/libexec/filters/ifhp
  :ifhp=model=hp4100
  :lp=10.0.0.23%9100

Now try:  lpr -Plp -Ztray3
and see what happens.

> 
>I did try to download the .rpm for your newest version (3.8.26), but 
> maybe I did not do it right. The RedHat box complained that it 
> conflicted with the version of setup? Do I need to try to compile the 
> source code directly? I did notice in your Release Notes that one issue 
> that you resolved with the newer version was to stop certain options 
> from being dropped unintentionally, and I was hopeful that I had the 
> answer.
> 
>  Any help or suggestions or links that you could send our way would 
> be greatly appreciated. Again, the same older printer works like a charm 
> locally, it is just the jobs it sends remotely that mess up.
> 
> 
> Thanks,
> 
> 
> Bill Mohrhardt, IT Manager,
> 
> Ecological Fibers, Inc.
> 
> (401) 725-9700 Ext. 325
> 
> (978) 537-0003 Ext. 105 (Wednesdays)
> 
> [EMAIL PROTECTED]

-- 
Patrick Powell Astart Technologies
[EMAIL PROTECTED]6741 Convoy Court
Network and System San Diego, CA 92111
  Consulting   858-874-6543 FAX 858-751-2435
LPRng - Print Spooler (http://www.lprng.com)

-
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTE

Re: LPRng: ifhp-3.5.16/7

2004-04-21 Thread Patrick Powell
On Fri, Apr 16, 2004 at 01:53:47PM +0200, Reiner Linnenkohl wrote:
> Hello,
> 
> since ifhp-3.5.16/17 i have the following problem:
> 
> $ file insd2_neu_blade
> insd2_neu_blade: ISO-8859 C++ program text
> 
> $ lpr -Pprinter2  insd2_neu_blade
> $ lpq -
> 
> 
> Filter_status: sending job file at 11:38:42.100
> Filter_status: starting transfer at 11:38:42.100
> Filter_status: file program = '/usr/local/bin/file 
> dfA146insl17.etec.uni-karlsruhe.de' at 11:38:42.100
> Filter_status: started FILE_UTIL- 'file' at 11:38:42.139
> Filter_status: file information = 'iso-8859_c++_program_text' at 
> 11:38:42.144
> Filter_status: initial job type 'iso-8859_c++_program_text' at 11:38:42.145
> Filter_status: decoded job type 'msg' at 11:38:42.145
> Filter_status: job type 'msg', converter 'no_converter' at 11:38:42.145
> Filter_status: converter done, output 154 bytes at 11:38:42.163
> Filter_status: initial job type 'POSTSCRIPT' at 11:38:42.163
> Filter_status: decoded job type 'POSTSCRIPT' at 11:38:42.163
> Filter_status: job type 'POSTSCRIPT' at 11:38:42.163
> Filter_status: transferring 154 bytes at 11:38:42.163
> 
> 
> The paper comes out with the message" No conversion available for type 
> 'iso-8859_c++_program_text' .
> All other types of documents are printed correctly !
> Until ifhp-3.5.14 do not ocurrir this problem.
> 
> I'm working on Solaris (SunOS 5.9 Generic_112233-11 sun4u sparc 
> SUNW,Sun-Blade-1000) with gcc-3.2.3,
> file-4.09, AFPL Ghostscript 8.00 and LPRng-3.8.26
> 
> Is there anybody who could help,
> Thank's a lot,
> Reiner
> 
> -- 
> Reiner Linnenkohl
> Universit?t Karlsruhe - Nachrichtentechnik
> Systemadministration - Tel.: +49 721 608-6502
> e-mail: [EMAIL PROTECTED]
> 
> 
> -
> YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
> The address you post from MUST be your subscription address
> 
> If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
> or lprng-digest-requests) with the word 'help' in the body.  For the 
> impatient,
> to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
> with:   | example:
> subscribe LIST|  subscribe lprng-digest [EMAIL PROTECTED]
> unsubscribe LIST  |  unsubscribe lprng [EMAIL PROTECTED]
> 
> If you have major problems,  send email to [EMAIL PROTECTED] with the word
> LPRNGLIST in the SUBJECT line.
> -


ifhp uses the output of the 'file' program to determine
the file type,  and then looks up the type in a table.

  Filter_status: file information = 'iso-8859_c++_program_text' at 
  ^^^
If you look in the ifhp.conf file, you will find:

# example conversion program
file_output_match = [
  *postscript*  ps   \%s{ps_converter}
  *pdf* ps   \%s{pdf2ps_converter}
  *pcl* pcl  \%s{pcl_converter}
  *pjl* pjl  \%s{pjl_converter}
  *printer*job*language* pjl
  *ascii*text*  ps  \%s{text_converter}
  *gzip_compressed*  filter  \%s{gzip_decompress}
  * msg  no_converter
  ]

Note that 'program text' may match some binaries.  From the /usr/share/magic
file,  which is used by the file conversion program:

# text if readable, executable if runnable binary, data if unreadable.

0   string /1\ :pserver:cvs password text file
0   string  -h- Software Tools format archive text
10  string  #\ This\ is\ a\ shell\ archive  shell archive text
0   string  @echo\ off  MS-DOS batch file text
0   string  \377WPC\020\000\000\000\022\012\001\001\000\000\000\000 (WP) loadable 
text

... and so forth

I you can add or change this by using:
file_output_match = [
  *postscript*  ps   \%s{ps_converter}
  *pdf* ps   \%s{pdf2ps_converter}
  *pcl* pcl  \%s{pcl_converter}
  *pjl* pjl  \%s{pjl_converter}
  *printer*job*language* pjl
  *ascii*text*  ps  \%s{text_converter}
  *program*text*  ps  \%s{text_converter}
  *gzip_compressed*  filter  \%s{gzip_decompress}
  * msg  no_converter
  ]

Patrick Powell Astart Technologies
[EMAIL PROTECTED]6741 Convoy Court
Network and System San Diego, CA 92111
  Consulting   858-874-6543 FAX 858-751-2435
LPRng - Print Spooler (http://www.lprng.com)

-
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:   | example:
subscribe LIST|  subscribe lprng-digest [EMAIL PROTE

Re: LPRng: HF_NAME information missing

2004-04-21 Thread Patrick Powell
On Mon, Apr 12, 2004 at 08:45:11PM +0200, Christian Reiber wrote:
> Hello Patrick,
> 
> this is a reply to the thread "LPRng: HF_NAME information missing" in the 
> LPrng mailing list (the latest entry of that thread dates 
> Thu, 18 Mar 2004 23:15:58 -0800). Sorry that I send this mail directly to you,
> but it contains a solution which I do not want to release to the list before
> you have reviewed -- it is based on a more than vague knowledge what is going
> on, so I do not dare to publish it.
> 
> You proposed a patch and two list members reported that this patch does
> not solve the problem. I experienced the same in a setup a where a 
> FreeBSD client with a plain classic lpd prints to a remote print server
> which runs LPRng. 
> 
> I slightly changed the patch (for common/lpd_rcvjob.c) and now it works for me.
> I changed this line (line 435 in lpd_rcvjob.c):
> 
> --
> DEBUGF(DRECV2)("Receive_job: eof on transfer, job.info.count %d, files.count 
> %d",
> job.info.count, files.count );
> if( hold_fd ){
> if( !discarding_large_job ){
> --
> DEBUGF(DRECV2)("Receive_job: eof on transfer, job.info.count %d, files.count 
> %d",
> job.info.count, files.count );
> !   if( hold_fd > 0){
> if( !discarding_large_job ){
> --
> 
> Traces showed that Check_for_missing_files() was called twice for this
> job, once from line 402 in lpd_rcvjob.c and a second time from line 439.
> I assume that this second call should not happen unless an hold file is
> allocated (so perhaps a "if (hold_fd != -1)" would even be better).
> 
> I now have no more printing delays when submitting a print job. (I just have 
> one of those [EMAIL PROTECTED] problems where the printer is locked up after the 
> first
> postscript job and unfortunately I have not yet discovered what it is missing;
> printing from a Windows box the same way works flawlessly, using tons of 
> driver code supplied by the vendor. So it must be something in the postscript
> which makes it hang :-(
> 
> In case you agree you will possibly want to post it on the list as a 
> follow-up to the mentioned thread (I am not a list member).
> 
> Cheers  Christian
> 
> -- 
> Christian Reiber, [EMAIL PROTECTED]

This appears to be the case.

I will add the patch and repost it.

-- 
Patrick Powell Astart Technologies
[EMAIL PROTECTED]6741 Convoy Court
Network and System San Diego, CA 92111
  Consulting   858-874-6543 FAX 858-751-2435
LPRng - Print Spooler (http://www.lprng.com)

-
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:   | example:
subscribe LIST|  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST  |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-