[PLUG] LPRng doesn't work on local printer - RESOLVED

Anthony Schlemmer aschlemm at attbi.com
Sun Nov 3 00:01:31 UTC 2002


Well it looks like I was fighting a "tcpwrappers" problem and that is 
why I couldn't connect to "lpd" when I didn't use a 
-P<printer>@<hostname> agument. It looks like there might be a bug in 
"lpr" as it appears to use a hostname of "unknown" when no hostname is 
specified with the "-P" argument even through it spits out the name 
"localhost" all over the place in the debug messages.

I added the following to my /etc/hosts.allow file and I'm glad my 
workstation sits behind a firewall as I don't like specifing "UNKNOWN" 
here to make things work:

lpd : 192.168.1.0/255.255.255.0 LOCAL UNKNOWN : ALLOW

It's a rather glaring bug IMHO but things at least work for me now:

tigger:/etc # pr -f /etc/hosts | lpr -Poptra -V
LPRng-3.8.12, Copyright 1988-2002 Patrick Powell, <papowell at lprng.com>
sending job 'root at tigger+504' to optra at localhost
connecting to 'localhost', attempt 1
connected to 'localhost'
requesting printer optra at localhost
sending control file 'cfA504tigger.home.lan' to optra at localhost
completed sending 'cfA504tigger.home.lan' to optra at localhost
sending data file 'dfA504tigger.home.lan' to optra at localhost
completed sending 'dfA504tigger.home.lan' to optra at localhost
done job 'root at tigger+504' transfer to optra at localhost

And the syslog messages confirm this behavior:

Nov  2 15:53:42 tigger lpd[24358]: connection from unknown
Nov  2 15:54:00 tigger lpd[24358]: connection from unknown

Tony

On Friday 01 November 2002 19:21 pm, Anthony Schlemmer wrote:
> Well I thought I had printing working with CUPS but one thing I'm
> finding painful is the fact that CUPS doesn't support a simple (no
> filter) forward to a remote printer queue. One remote printer server
> I have to deal runs "apsfilter" and so it's smart enough to know how
> to convert PostScript to something the PCL-based HP laser printer
> connected to the server can handle.
>
> I tried setting up CUPS to filter and produce the proper output but I
> find on the remote printer I then gets an extra one inch of top
> margin on every page printed and I also get two empty pages which
> preceed every print job I send from my Linux box.
>
> I removed CUPS and the only other option that SuSE 8.1 offers is the
> use of LPRng. This solved all of my remote problems expect now I
> can't get my locally connected inkjet printer to work at all. I keep
> seeing the following messages from "lpr" and my syslog is filled with
> "connection refused" errors:
>
> Nov  1 17:41:57 tigger lpd[9643]: connection refused from unknown
> Nov  1 17:43:25 tigger lpd[9889]: connection refused from unknown
> Nov  1 17:43:37 tigger last message repeated 2 times
> Nov  1 17:46:16 tigger lpd[9889]: connection refused from unknown
> Nov  1 17:48:57 tigger lpd[10296]: connection refused from unknown
> Nov  1 17:49:29 tigger lpd[10391]: connection refused from unknown
> Nov  1 17:51:54 tigger lpd[10519]: connection refused from unknown
> Nov  1 17:52:12 tigger lpd[10619]: connection refused from unknown
> Nov  1 17:52:45 tigger lpd[10915]: connection refused from unknown
> Nov  1 17:53:30 tigger lpd[10915]: connection refused from unknown
> Nov  1 17:54:33 tigger last message repeated 7 times
>
> When I try to print something to th local printer I get the following
> errors from "lpr":
>
> tigger:/usr/sbin # cat /etc/hosts | lpr -Poptra
> Status Information:
>  sending job 'root at tigger+997' to optra at localhost
>  connecting to 'localhost', attempt 1
>  connected to 'localhost'
>  requesting printer optra at localhost
>  job 'root at tigger+997' transfer to optra at localhost failed
>   error 'ERROR TRANSFERRING DATA'
>   sending str '^Boptra' to optra at localhost
> tigger:/usr/sbin #
>
> Can anyone help? I don't see that "lpd" is actively listening to port
> 515 which is what I used to see when I was using a BSD-style LPD
> process. "lpd" is running and I get a completely different error
> asking me to check that "lpd" is running. I'm at wits end as to why
> any LPRng client programs are unable to transfer any data.
>
> Thanks,
>
> Tony

-- 
Anthony Schlemmer
aschlemm at attbi.com





More information about the PLUG mailing list