Lpd hangs at startup when remote printer is offline and there are jobs for the printer

Lpd hangs at startup when remote printer is offline and there are jobs for the printer

Post by Boris Benk » Sun, 31 Dec 1899 09:00:00



Hi there!

I have a problem and I can't get rid of it. I have a lpd installed on
RedHat 6.0 (but please note that the problem is the same on another box,
RH 6.2). I've got about 50 remote printers in /etc/printcap and
everything works ok, but...

If there is a job for the remote printer and the printer is not switched
on (remote printers are HP JetDirects) the daemon *HANGS* when being
restarted. I have no special reason to restart it, but, from time to
time (once in three months or so) I have to reboot the machine (for
other reasons, like upgrading the disk, etc...) or I have to restart the
daemon itself (again for some other reason).

The problem is, that the daemon won't come up. It hangs at the point
when it tries to connect to the printer which is not switched on. So...
I have to clean up the queue and restart lpd again. And then it's ok.

How to prevent the daemon from*?

Thanks in advance for your answer!

=b

  Boris.Benko.vcf
< 1K Download
 
 
 

Lpd hangs at startup when remote printer is offline and there are jobs for the printer

Post by Villy Kru » Sun, 31 Dec 1899 09:00:00


On Thu, 12 Oct 2000 06:33:54 +0200,

Quote:

>Hi there!

>I have a problem and I can't get rid of it. I have a lpd installed on
>RedHat 6.0 (but please note that the problem is the same on another box,
>RH 6.2). I've got about 50 remote printers in /etc/printcap and
>everything works ok, but...

>If there is a job for the remote printer and the printer is not switched
>on (remote printers are HP JetDirects) the daemon *HANGS* when being
>restarted. I have no special reason to restart it, but, from time to
>time (once in three months or so) I have to reboot the machine (for
>other reasons, like upgrading the disk, etc...) or I have to restart the
>daemon itself (again for some other reason).

There is a general problem with lpd in that it will check the remote
server for its queue.  For simple printer boxes or printers with builtin
ethernet interfaces, this query would be pointless as these would neve
contain a print queue anyway, but what is more problematic is that
if the printer is busy printing then the printer box won't answer these
queries.  What you could do is hack the lpd source so it won't do remote
printer queue queries, which of course is not a good idea of you use
the same lpd daemon to forward print requests to another lpd daemon.

If you can get a printer backend using port 9100 or something similar
it probably would work better; maybe it was port 7100.  The LPDng
packages includes this, as well as quite a lot of reading stuff
that might help you solve your problem.  If I'm not mistaken, redhat
os adopted LPRng in the next release and dropped the old lpd package.

Villy

 
 
 

1. lpd: job could not connect to remote printer

Dear readers,

hopefully somebody can help.

I want to print a text file on a remote printer (network printserver form
dlink) from en embedded pc.
I wanted to use the old line printer demon (lpd) as I thought it needs few
resources.
On my desktop PC, it works fine. On an embedded system, it does not work. On
both systems the same linux kernel 2.4.10 is installed. On the desktop PC,
the linux was installed automatically (SuSE 7.3).

I just copied the files lpd, lpr from the desktop pc to the embedded pc.

On the embedded PC, nothing happens after "lpr -Plta textfilename". (lta is
the queue name)
In the system log, one reads:
emblinux lpr.warn lpd [162]: lta: job could not be sent to remote host
(cfA000emblinux)

(emblinux is the name of the computer)

The printcap reads as follows:
# printcap start
lta:\
 :lp=:sh:\
 :lf=/dev/ttyS0:\
 :sd=/var/spool/lpd/lj5:\
 :rm=printserver:rp=text:
#printcap end

I don't know what to write for "rp=", but on the desktop PC it works also
this way. (on the desktop pc I can write anything here).
printserver is the name of the printserver and is defined in hosts.
"ping printserver" works, as well as "telnet printserver", which comes up
with a configuration menu.

if I start /usr/sbin/lpd nothing is reported. There is no /dev/printer

Or should I use lprng instead? But how huge is it?

Ernst

2. Geforce2/XFree86 4.02 on SuSE 7.0 question

3. Setting up a SCO lpr printer to serve as remote printer for PC lpd's

4. AHA 2940 Adaptec SCSI

5. Hung Print Jobs: Printer Driver for DataProducts Line Printer

6. "new line" in sed script

7. remote printer for other unix...lpd, host.lpd, etc

8. signal 11

9. lpr: lpd thinks my printer is offline

10. lpd thinks printer is offline

11. lpd reports that printer is offline (hmmm)

12. printer offline = jobs -> /dev/null

13. kepping jobs when printer is offline