lpd: Name does not resolve\ /dev/lp: No such file or Directory

Hello there,

I try to setup lpd to access a network printer. However:

Code:
root@partybuero:/home/sanchez # service lpd start
Starting lpd.
chkprintcap: Warning: new entry starts after line with trailing '\', at line 54 (entry rm=sharp-printer.rda)
chkprintcap: Warning: new entry starts after line with trailing '\', at line 55 (entry sh)
chkprintcap: Warning: new entry starts after line with trailing '\', at line 56 (entry mx#0)
chkprintcap: Warning: new entry starts after line with trailing '\', at line 57 (entry sd=/var/spool/lpd/lp)
chkprintcap: Warning: new entry starts after line with trailing '\', at line 58 (entry lf=/var/log/lpd-errs)
chkprintcap:    5 warnings from skimming /etc/printcap
chkprintcap: WARNING: found 6 entries when skimming /etc/printcap,
chkprintcap: WARNING:  but only found 1 queues to process!
root@partybuero:/home/sanchez # cat /etc/printcap
lp:\
rm=sharp-printer.rda:\
sh:\
mx#0:\
sd=/var/spool/lpd/lp:\
lf=/var/log/lpd-errs:

The error I receive when tailing upon a simple "printf "yeah" | lpr" ...

Code:
root@partybuero:/home/sanchez # tail -f /var/log/lpd-errs
May  6 17:13:10 partybuero lpd[2675]: lpd startup: logging=0
May  6 17:13:10 partybuero lpd[2676]: unable to get official name for local machine partybuero: Name does not resolve

Indeed, /dev/lp is not there. I could not have accidentally deleted it, could I?

Code:
root@partybuero:/home/sanchez # ls /dev/l*
/dev/log

/dev/led:
ahci0.0.fault   ahci0.0.locate  ahci0.1.fault   ahci0.1.locate
root@partybuero:/home/sanchez #

I was trying to obtain as much knowledge from the following thread as possible:
https://forums.freebsd.org/threads/lpd-apparently-not-running.50211/ as this was the closest I could find to match my problem description ... reading the manpage for lpd on OpenBSD reveals the following (https://man.freebsd.org/cgi/man.cgi?query=lpd&sektion=8&apropos=0&manpath=OpenBSD+6.9):

Code:
lpd performs reverse DNS    lookups    on network clients.  If    a client host-
name cannot be determined from its IP address, the print     request  will
be  silently  dropped.    This is    important to note when debugging print
problems    in dynamic address environments.

Indeed I am obtaining my local address, currently 192.168.77.17, via DHCP. There is no option to use a static IP. Please help, I'm stuck here.

Thank you in advance.

Code:
root@partybuero:/home/sanchez # uname -a
FreeBSD partybuero 14.2-RELEASE FreeBSD 14.2-RELEASE releng/14.2-n269506-c8918d6c7412 GENERIC amd64
root@partybuero:/home/sanchez # cat /etc/rc.conf
hostname="partybuero"
keymap="de.kbd"
ifconfig_bge0="DHCP"
sshd_enable="YES"
moused_enable="YES"
ntpd_enable="YES"
powerd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
kld_list="i915kms"
dbus_enable="YES"
sddm_enable="YES"
lpd_enable="YES"
root@partybuero:/home/sanchez #
 
Code:
root@partybuero:/home/sanchez # cat /etc/printcap
lp:\
rm=sharp-printer.rda:\
sh:\
mx#0:\
sd=/var/spool/lpd/lp:\
lf=/var/log/lpd-errs:
termcap(5) and printcap(5) are extremely finicky about formatting.

Code:
lp:\
    rm=sharp-printer.rda:\
    sh:\
    mx#0:\
    sd=/var/spool/lpd/lp:\
    lf=/var/log/lpd-errs:
 
Thanks! Never would've thought of that ...

Anyway, upon ...

Code:
root@partybuero:/home/sanchez # service lpd start
Starting lpd.
root@partybuero:/home/sanchez # printf "yeah" | lpr
root@partybuero:/home/sanchez #

... this happens:

Code:
root@partybuero:/home/sanchez # tail -f /var/log/lpd-errs
May  6 18:01:46 partybuero lpd[3373]: lpd startup: logging=0
May  6 18:01:46 partybuero lpd[3374]: /dev/lp: No such file or directory
May  6 18:01:49 partybuero lpd[3377]: /dev/lp: No such file or directory

Might I emphasize that /dev/lp still does not exist ... Can I obtain a link from somewhere?

Code:
root@partybuero:/home/sanchez # find / -name "lp"
/usr/local/bin/lp
/usr/bin/lp
/var/spool/lpd/lp
root@partybuero:/home/sanchez #
 
you don't need a /dev/lp for a remote printer
/dev/lp is just the default device for a local printer (lp attribute) but should not be needed if rm
also rm should be a printer running lpd daemon. for jetdirect use lp=9100@machine and delete the rm
 
/dev/lp is the old Centronix parallel printerport

$ man -S4 lp

been a good number of years since I had a PC with one of those.
 
Thanks again for your replies.

What seems to be the issue then? There is just nothing coming out of the printer, neither does it seem to be receiving any jobs.

Still with the aforementioned error of /dev/lp: No such file or directory ...
 
Have you re-read default /etc/printcap?
If your remote printer is named, for example, lpserver.example.com, set lpserver.example.com (or if example.com here is the only network you have, lpserver) or its IP address to rm instead of lphost.

Depending on the protocol the remote printer accepts, host name should include, for example, port No., user name, password and any other required.

If you don't need any pre-processing like LF to CRLF, if= part is not needed.
And maybe HP JetDirect's guide would be of help.
 
Back
Top