Solved lpd - lpstat 'The printer is unreachable at this time.'

Cause: CUPS was configured to use IPv4 addresses. LPD was configured to use domain names. A change to the printer addresses and to DNS allowed LPD to work and broke CUPS.

Solution: Reconfigure printers in CUPS to use IPP to printer domain names.

OP:
I am seeing this in lpstat -p -d -R:

Code:
# lpstat -p -d -R
printer CUPS_PCL3_to_File_jbb is idle.  enabled since Fri Aug 20 14:54:54 2021
printer laserIII_PCL is idle.  enabled since Fri May 21 16:13:32 2021
printer NP4171.HAMILTON.HARTE-LYNE.CA is idle.  enabled since Thu Jun 17 09:46:10 2021
printer NP4172.HAMILTON.HARTE-LYNE.CA now printing NP4172.HAMILTON.HARTE-LYNE.CA-921.  enabled since Tue Apr 26 11:53:26 2022
    The printer is unreachable at this time.
printer NP4173.HAMILTON.HARTE-LYNE.CA now printing NP4173.HAMILTON.HARTE-LYNE.CA-923.  enabled since Tue Apr 26 12:04:17 2022
    The printer is unreachable at this time.
printer NP4174.HAMILTON.HARTE-LYNE.CA now printing NP4174.HAMILTON.HARTE-LYNE.CA-922.  enabled since Tue Apr 26 12:04:17 2022
    The printer is unreachable at this time.
printer Virtual_PDF_Printer is idle.  enabled since Wed Feb 16 09:01:53 2022
system default destination: NP4172.HAMILTON.HARTE-LYNE.CA

All these ca be reached from this host:
Code:
# for N in {1..4} ; do ping -t1 NP417$N.HAMILTON.HARTE-LYNE.CA ; done
PING np4171.hamilton.harte-lyne.ca (216.185.71.51): 56 data bytes
64 bytes from 216.185.71.51: icmp_seq=0 ttl=254 time=0.721 ms

--- np4171.hamilton.harte-lyne.ca ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.721/0.721/0.721/0.000 ms
PING np4172.hamilton.harte-lyne.ca (216.185.71.52): 56 data bytes
64 bytes from 216.185.71.52: icmp_seq=0 ttl=254 time=9.178 ms

--- np4172.hamilton.harte-lyne.ca ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 9.178/9.178/9.178/0.000 ms
PING np4173.hamilton.harte-lyne.ca (216.185.71.53): 56 data bytes
64 bytes from 216.185.71.53: icmp_seq=0 ttl=254 time=0.503 ms

--- np4173.hamilton.harte-lyne.ca ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.503/0.503/0.503/0.000 ms
PING np4174.hamilton.harte-lyne.ca (216.185.71.54): 56 data bytes
64 bytes from 216.185.71.54: icmp_seq=0 ttl=254 time=0.746 ms

--- np4174.hamilton.harte-lyne.ca ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.746/0.746/0.746/0.000 ms

There are no job files in /var/spool/lpd/np417[1..4]. I can send output to these printers using: printf "1. This printer can print.\n2. This is the second line.\n" | lpr -P np4173. However, I cannot get anything to print from the mate desktop I use. Things sent from pluma or Firefox just do not print. The print dialogue shows: The printer is unreachable at this time.

What is going on and how do I fix it? I have restarted both lpd and cupsd without effect.
 
LOCALHOST:631 is the URL of the cups management tool, not the URI of the printer.

My first guess is that the URI for the printer was mis-configured when the printer was set up.

Review the option list, and verify your choice.

Also have a read of "Using Network Printers": http://localhost:631/ -> Help -> Overview of CUPS -> Using Network Printers

The "Common Device URIs" page is also accessible from that page.
 
The problem was that when I originally setup the printers (a long time ago) I defined them as AppSocket/HP JetDirect devices using an explicit IP_addr. Recently, I was required to set up lpd to handle virtual printing from a legacy computer system. In /etc/printcap I defined these printers with their domain names. This was fine until last week when I was required to change the network addresses on those printers and their associated DNS entries due to recent problems with a failed router.

This invalidated the CUPS configuration but was transparent to lpd. I have redefined the CUPS printers to use ipp and that has resolved the issue.

Thank you for the help.
 
Back
Top