-
-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lprint is sensitive to both system hostname and server name #142
Comments
The blabbering above was of course coincidental. Now I am getting that error regardless of the hostname:
I will continue investigating and will report when I find anything. |
Printing succeeds if I set
Setting the same option as default does not help:
|
OK, so you are having a bunch of problems, and not all of them related I think. The CUPS "lp" and "lpadmin" command issues are specific to CUPS and not LPrint. The "print-quality" option is what IPP calls an enum value - 3 is draft, 4 is normal, and 5 is high or best quality. The strings are only supported for the "cupsPrintQuality" option which is part of the PPD options. The default PPD option name is "DefaultcupsPrintQuality", not "cupsPrintQuality-default"... |
Here's something very, very weird that I've been struggling with for the past 10 hours or so. lprint seems to be very finicky about the system hostname settings.
Here's what I have:
My home office network uses both mDNS (*.local) and and actual DNS server (with the domain *.hal, dynamically populated by the router from the DHCP data) to resolve host addresses.
I have an existing print server, let's call it print.local, that is a proxmox container running Debian bookworm (amd64) with a self-built lprint server (I had trouble getting snap to work inside the container).
I have two USB label printers connected to print.local:
Both have been working without any issues: I've been printing to both on Mac command line and GUI apps.
Next, I got a Raspberry Pi CM4 device called pi.hal (arm64, running Raspeberry Pi OS Bookworm) and installed lprint on it using snap. Fairly straightforward. I can print a .png file to both printers using
lprint
on the command line.Then, the troubles start. On pi.hal command line,
lp -d VevorPi debug_output_ADDRESSLABEL_20240506173419.pdf
results in no output. Debug logging gives the following:Same happens with the Munbyn printer.
Mac behavior is even stranger. I could see and install the printers on the system print dialog but printing a PDF label using the preview app is first stuck in "Processing page: 1" and then after a longish time, in Print Center, the print job appears and the printer goes offline. As soon as I pause the job, the printer immediately comes back online.
This all worked on print.local. I went through the lprint.state files on both machines and couldn't find any differences, and also the server command line arguments were identical. I tried also a self-built lprint on pi.hal, but that didn't make a difference.
Changing the server-name option on pi.hal to either
pi.hal
orpi.local
seemed to cause some change in the Mac behavior, and then I noticed the other server/etc/hostname
wasprint.local
, so I tried changing the Pi/etc/hostname
topi.local
. After that, printing to either printer worked, both locally, from a remote Linux host, and from the Mac laptop.I also tried setting
/etc/hostname
to a "bare" hostname:pi
. This resulted in printing from the Mac laptop still working, but when printing from another Linux withlp
, I got the same "print-quality enum 0" thing as above.As said, I spent quite a few hours debugging this issue. There was really no hint that any of the errors would be related to the hostname. At some point I got errors in the debug level log about bad hostname or something similar - I wonder is
lprint
too restrictive in its hostname matching? I think none of this would've happened if only the bare hostname was matched to the request.The text was updated successfully, but these errors were encountered: