Problem with lpd "waiting for host to come up"

Hello All,

I am trying to set up a HP Laserjet Enterprise 700 M712 as my default printer throught lpd/lpr. I follows the handbook to get the following /etc/printcap file :

Code:
lp|lp1:HP700:\
    :lp=:\
    :sh :\
    :rm=laserjet:\
    :sd=/var/spool/lpd/lp1:\
    :lf=/var/log/lpd-errs:\

where laserjet is the printer hostname (ping works fine). The documentation of that printer says it accept postscript3, pdf1.4, pcl5e and pcl6. I convert a pdf file in that 4 formats with a suitable gs device and send it to the printer with lpr. But it results that no document is printed and I have the following message with lpq(1):

Code:
my_hostname: waiting for laserjet to come up
Rank   Owner      Job  Files                                 Total Size
1st    root      1     path_to_pdf                        332932 bytes

Is something wrong with my configuration?

Also I do: nc laserjet 9100 < file.txt

where file.txt is a simple text file and it works fine.

Sincerely, Airwan.
 
Thanks covocat for your kind help. I changed rm to lp option but it cannot print and I obtain:

Code:
root@bureau# lpc status lp
lp:
    queuing is enabled
    printing is enabled
    1 entry in spool area
    printer idle
root@bureau# lpq -a
lp:
Warning: no daemon present
Rank   Owner      Job  Files                                 Total Size
1st    root       0    test.pcl                                1699933 bytes
where test.pcl is the convertion of a test.pdf with gs and device ljet4. Same occurs with a pdf 1.4 and a postscript level 3

I tried to restart the daemon with lpc restart lp but still the same problem!

:(
 
this works for me
Code:
testing|sample remote printer:\
        :sh:\
        :lp=9100@10.1.1.96:lf=/var/log/lpd-errs:\
        :sd=/var/spool/output/lpd:
lpr -P tesing X.pdf
 

Attachments

  • Screen Shot 2021-12-09 at 8.43.09 AM.png
    Screen Shot 2021-12-09 at 8.43.09 AM.png
    47.3 KB · Views: 186
Please verify your spool directory. I would expect it to be /var/spool/lpd/<printer_name>. Please check that it exists, and has the correct mode and owner/group. Here is one that I prepared (much) earlier (it's from my on-line backups of a system that used lpd). My printer's host name is hp4050n (sd=/var/spool/lpd/hp4050n). The files inside the spool directory are created and managed by lpd:
Code:
[sherman.143] # ls -la /var/spool/lpd
total 15
drwxr-xr-x  3 root  daemon  3 Aug 15  2010 .
drwxr-xr-x  9 root  wheel   9 Dec  9  2012 ..
drwxrwxr-x  2 root  daemon  6 Mar  3  2018 hp4050n

[sherman.144] # ls -la /var/spool/lpd/hp4050n
total 3
drwxrwxr-x  2 root  daemon   6 Mar  3  2018 .
drwxr-xr-x  3 root  daemon   3 Aug 15  2010 ..
-rw-r----x  1 root  daemon   4 Mar  3  2018 .seq
-rw-rw-r--  7 root  daemon   0 Nov  3  2013 errs.4muweZ4
-rw-rw-r--  1 root  daemon  33 Mar  3  2018 lock
-rw-rw-r--  1 root  daemon  30 Mar  3  2018 status
If there are still problems after you have verified that the spooling is set up correctly...

The technical specifications on your HP Laserjet Enterprise 700 M712 printer suggest that is supports "HP PCL 6, HP PCL 5e, HP Postscript 3 emulation, native PDF printing (v 1.4)".

So the first thing you need to do is select test files that can be printed without lpd(8), just using nc(1) as you have above, in your initial post. Once you are certain that a test file can be printed, we can use it to diagnosing the problem with lpr/lpd.

After each failure with lpd, we need to see the content of log file /var/log/lpd-errs.
 
I recently had a connectivity problem with an HP LaserJet that was caused by the printer not properly implementing the TCP time stamp option. FreeBSD a while ago (6 months?) got more strict by default and would drop packets received from the printer, making it look like it never responded. To make FreeBSD more liberal like in the past, connectivity was restored with

sysctl net.inet.tcp.tolerate_missing_ts=1

Does that fix your problem?
 
Back
Top